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>2010-09-02 01:06:36 +0400
committerChristopher Faylor <me@cgf.cx>2010-09-02 01:06:36 +0400
commitfc0e5071bcbc5670e9710c052f8ea99ab5d3c447 (patch)
tree597aaea996a1184c47b956aa9c121a138f066405 /winsup/cygwin
parentb9874a0c1409a238de44a2413b8a82875fd68084 (diff)
* dcrt0.cc (dll_crt0_0): Remove myself settings.
* fork.cc (fork): Set myself process_state * pinfo.cc (pinfo_init): Ditto. (pinfo::thisproc): Make sure any sendsig setting is correctly copied. * pinfo.h: Update copyright. Remove unused code.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r--winsup/cygwin/ChangeLog8
-rw-r--r--winsup/cygwin/dcrt0.cc3
-rw-r--r--winsup/cygwin/fork.cc5
-rw-r--r--winsup/cygwin/pinfo.cc3
-rw-r--r--winsup/cygwin/pinfo.h4
5 files changed, 17 insertions, 6 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index aa8ceab66..f75f55093 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,13 @@
2010-09-01 Christopher Faylor <me+cygwin@cgf.cx>
+ * dcrt0.cc (dll_crt0_0): Remove myself settings.
+ * fork.cc (fork): Set myself process_state
+ * pinfo.cc (pinfo_init): Ditto.
+ (pinfo::thisproc): Make sure any sendsig setting is correctly copied.
+ * pinfo.h: Update copyright. Remove unused code.
+
+2010-09-01 Christopher Faylor <me+cygwin@cgf.cx>
+
* cygthread.cc (cygthread::create): Fix incorrect use of name rather
than __name.
* cygthread.h (cygthread::cygthread): Create versions which eliminate
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index ecd9a6cb4..c84b06f7b 100644
--- a/winsup/cygwin/dcrt0.cc
+++ b/winsup/cygwin/dcrt0.cc
@@ -715,9 +715,6 @@ dll_crt0_0 ()
GetCurrentProcess (), &hMainThread,
0, false, DUPLICATE_SAME_ACCESS);
- myself->process_state |= PID_ACTIVE;
- myself->process_state &= ~PID_INITIALIZING;
-
OpenProcessToken (GetCurrentProcess (), MAXIMUM_ALLOWED, &hProcToken);
set_cygwin_privileges (hProcToken);
diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc
index b942c72fc..5a70c7b87 100644
--- a/winsup/cygwin/fork.cc
+++ b/winsup/cygwin/fork.cc
@@ -619,7 +619,10 @@ fork ()
MALLOC_CHECK;
if (ischild)
- /* nothing to do */;
+ {
+ myself->process_state |= PID_ACTIVE;
+ myself->process_state &= ~(PID_INITIALIZING | PID_EXITED);
+ }
else if (res < 0)
{
if (!grouped.error)
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index 106d3573e..c2709ead1 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -62,6 +62,7 @@ pinfo::thisproc (HANDLE h)
init (cygheap->pid, PID_IN_USE, h ?: INVALID_HANDLE_VALUE);
procinfo->process_state |= PID_IN_USE;
procinfo->dwProcessId = myself_initial.pid;
+ procinfo->sendsig = myself_initial.sendsig;
wcscpy (procinfo->progname, myself_initial.progname);
strace.hello ();
debug_printf ("myself->dwProcessId %u", procinfo->dwProcessId);
@@ -109,6 +110,8 @@ pinfo_init (char **envp, int envc)
debug_printf ("Set nice to %d", myself->nice);
}
+ myself->process_state |= PID_ACTIVE;
+ myself->process_state &= ~(PID_INITIALIZING | PID_EXITED);
debug_printf ("pid %d, pgid %d", myself->pid, myself->pgid);
}
diff --git a/winsup/cygwin/pinfo.h b/winsup/cygwin/pinfo.h
index 3e7e547df..bc2940942 100644
--- a/winsup/cygwin/pinfo.h
+++ b/winsup/cygwin/pinfo.h
@@ -1,6 +1,7 @@
/* pinfo.h: process table info
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Red Hat, Inc.
+ Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+ Red Hat, Inc.
This file is part of Cygwin.
@@ -165,7 +166,6 @@ public:
int operator == (char *x) const {return (char *) procinfo == x;}
_pinfo *operator * () const {return procinfo;}
operator _pinfo * () const {return procinfo;}
- // operator bool () const {return (int) h;}
void preserve () { destroy = false; }
#ifndef _SIGPROC_H
int remember () {system_printf ("remember is not here"); return 0;}