Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2012-01-11 23:07:11 +0400
committerChristopher Faylor <me@cgf.cx>2012-01-11 23:07:11 +0400
commit0e1f0840d2def205a7e2089872038930643d48f7 (patch)
tree64df2c610ceccf24f646408496023aeed8ab15fa /winsup/cygwin/fhandler.h
parent5ecc040cff80eb26ef4977ce6dfe7f429778b584 (diff)
Update copyright on all files checked in so far this year.
* fhandler.h: Use #pragma once rather than ifdef guards. (fhandler_console::tc_getpgid): Return our pgid if we have never opened a console. * fork.cc: Rearrange includes to accommodate fhandler.h use of pinfo.h. * sigproc.cc: Ditto. * spawn.cc: Ditto. (child_info_spawn::worker): Query myself->pgid rather than calling expensive function. * thread.h: Use #pragma once rather than ifdef guards. * pinfo.h: Use #pragma once rather than ifdef guards. (pinfo::remember): Don't define if sigproc.h has not been included. (pinfo::reattach): Ditto. * sigproc.h: Use #pragma once rather than ifdef guards. Use different test to see if pinfo.h has been included.
Diffstat (limited to 'winsup/cygwin/fhandler.h')
-rw-r--r--winsup/cygwin/fhandler.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
index 0a73af82f..e4ba58423 100644
--- a/winsup/cygwin/fhandler.h
+++ b/winsup/cygwin/fhandler.h
@@ -1,7 +1,7 @@
/* fhandler.h
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
+ 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
This file is part of Cygwin.
@@ -9,8 +9,8 @@ This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
-#ifndef _FHANDLER_H_
-#define _FHANDLER_H_
+#pragma once
+#include "pinfo.h"
#include "tty.h"
/* fcntl flags used only internaly. */
@@ -1307,7 +1307,10 @@ private:
static console_state *open_shared_console (HWND, HANDLE&, bool&);
public:
- static pid_t tc_getpgid () {return shared_console_info->tty_min_state.getpgid ();}
+ static pid_t tc_getpgid ()
+ {
+ return shared_console_info ? shared_console_info->tty_min_state.getpgid () : myself->pgid;
+ }
fhandler_console (fh_devices);
static console_state *open_shared_console (HWND hw, HANDLE& h)
{
@@ -2113,4 +2116,3 @@ typedef union
char __virtual[sizeof (fhandler_virtual)];
char __windows[sizeof (fhandler_windows)];
} fhandler_union;
-#endif /* _FHANDLER_H_ */