* 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.
+2012-01-11 Christopher Faylor <me.cygwin2012@cgf.cx>
+
+ 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.
+
2012-01-09 Corinna Vinschen <corinna@vinschen.de>
* include/cygwin/process.h: Move here from newlib.
* miscfuncs.cc (thread_wrapper): Make sure stack is 16 byte aligned
to make gcc-3 compiled pthread applications happy.
-2012-01-08 Christopher Faylor <me.cygwin2011@cgf.cx>
+2012-01-08 Christopher Faylor <me.cygwin2012@cgf.cx>
* dtable.cc (dtable::stdio_init): Always initialize console when we
have one.
* cygwin.din (pthread_sigqueue): Export.
* posix.sgml (std-gnu): Add pthread_sigqueue.
* thread.cc (pthread_sigqueue): New function.
- * include/thread.h (pthread_sigqueue): New function.
+ * thread.h (pthread_sigqueue): New function.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
-2012-01-02 Christopher Faylor <me.cygwin2011@cgf.cx>
+2012-01-02 Christopher Faylor <me.cygwin2012@cgf.cx>
* path.cc (get_current_dir_name): Avoid memory leak. Don't return PWD
contents if directory doesn't actually exist.
/* dtable.cc: file descriptor support.
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.
/* 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.
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. */
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)
{
char __virtual[sizeof (fhandler_virtual)];
char __windows[sizeof (fhandler_windows)];
} fhandler_union;
-#endif /* _FHANDLER_H_ */
#include <unistd.h>
#include <stdlib.h>
#include "cygerrno.h"
+#include "sigproc.h"
+#include "pinfo.h"
#include "path.h"
#include "fhandler.h"
#include "dtable.h"
-#include "sigproc.h"
-#include "pinfo.h"
#include "cygheap.h"
#include "child_info.h"
#include "cygtls.h"
/* version.h -- Cygwin version numbers and accompanying documentation.
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.
/* path.cc: path support.
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
+ 2006, 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
This file is part of Cygwin.
/* pinfo.cc: process table support
Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
+ 2006, 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
This file is part of Cygwin.
/* pinfo.h: process table info
Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
- 2011 Red Hat, Inc.
+ 2011, 2012 Red Hat, Inc.
This file is part of Cygwin.
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
-#ifndef _PINFO_H
-#define _PINFO_H
+#pragma once
+
#include <sys/resource.h>
#include "thread.h"
operator _pinfo * () const {return procinfo;}
void preserve () { destroy = false; }
void allow_remove () { destroy = true; }
-#ifndef _SIGPROC_H
- int reattach () {system_printf ("reattach is not here"); return 0;}
- int remember () {system_printf ("remember is not here"); return 0;}
+#ifndef SIG_BAD_MASK // kludge to ensure that sigproc.h included
+ // int reattach () {system_printf ("reattach is not here"); return 0;}
+ // int remember (bool) {system_printf ("remember is not here"); return 0;}
#else
int reattach ()
{
void __stdcall fill_rusage (struct rusage *, HANDLE);
void __stdcall add_rusage (struct rusage *, struct rusage *);
-#endif /*_PINFO_H*/
/* sigproc.cc: inter/intra signal and sub process handler
Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
+ 2006, 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
This file is part of Cygwin.
#include <stdlib.h>
#include <sys/cygwin.h>
#include "cygerrno.h"
+#include "sigproc.h"
#include "path.h"
#include "fhandler.h"
#include "dtable.h"
-#include "sigproc.h"
#include "cygheap.h"
#include "child_info_magic.h"
#include "shared_info.h"
#include "cygtls.h"
-#include "pinfo.h"
#include "ntdll.h"
/*
/* sigproc.h
Copyright 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2011 Red Hat, Inc.
+ 2011, 2012 Red Hat, Inc.
This file is part of Cygwin.
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
-#ifndef _SIGPROC_H
-#define _SIGPROC_H
+#pragma once
#include <signal.h>
#ifdef NSIG
extern HANDLE sigCONT;
void __stdcall sig_dispatch_pending (bool fast = false);
-#ifdef _PINFO_H
+#ifdef EXITCODE_SET
extern "C" void __stdcall set_signal_mask (sigset_t newmask, sigset_t&);
#endif
int __stdcall handle_sigprocmask (int sig, const sigset_t *set,
extern struct sigaction *global_sigs;
#define myself_nowait ((_pinfo *) myself_nowait_dummy)
-#endif /*_SIGPROC_H*/
#include <winuser.h>
#include <wchar.h>
#include <ctype.h>
-#include "cygerrno.h"
#include <sys/cygwin.h>
+#include "cygerrno.h"
#include "security.h"
+#include "sigproc.h"
+#include "pinfo.h"
#include "path.h"
#include "fhandler.h"
#include "dtable.h"
-#include "sigproc.h"
#include "cygheap.h"
#include "child_info.h"
-#include "pinfo.h"
#include "environ.h"
#include "cygtls.h"
#include "tls_pbuf.h"
int looped = 0;
HANDLE orig_wr_proc_pipe = NULL;
+#if 0
myfault efault;
if (efault.faulted ())
{
res = -1;
goto out;
}
+#endif
child_info_types chtype;
if (mode != _P_OVERLAY)
because the Ctrl-C event is sent to all processes in the console, unless
they ignore it explicitely. CREATE_NEW_PROCESS_GROUP does that for us. */
if (!iscygwin () && myself->ctty >= 0 && iscons_dev (myself->ctty)
- && fhandler_console::tc_getpgid () != getpgrp ())
+ && fhandler_console::tc_getpgid () != myself->pgid)
c_flags |= CREATE_NEW_PROCESS_GROUP;
refresh_cygheap ();
/* When ruid != euid we create the new process under the current original
/* thread.cc: Locking and threading module functions
Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
+ 2006, 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
This file is part of Cygwin.
/* thread.h: Locking and threading module definitions
Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007,
- 2008, 2009, 2010, 2011 Red Hat, Inc.
+ 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
This file is part of Cygwin.
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
-#ifndef _THREAD_H
-#define _THREAD_H
+#pragma once
#define LOCK_MMAP_LIST 1
};
#define MT_INTERFACE user_data->threadinterface
-#endif // _THREAD_H