aboutsummaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2005-01-13 22:18:57 +0000
committerCorinna Vinschen <corinna@vinschen.de>2005-01-13 22:18:57 +0000
commit0dabe0e0c232687d9aa67ccd0474f4df8daf4f76 (patch)
treebc56447abe93e8d3e9b59ab8365da724d43d6c22 /winsup
parent9b8e782e11e7073a97af47a74f8e7816becdc5da (diff)
downloadnewlib-0dabe0e0c232687d9aa67ccd0474f4df8daf4f76.zip
newlib-0dabe0e0c232687d9aa67ccd0474f4df8daf4f76.tar.gz
newlib-0dabe0e0c232687d9aa67ccd0474f4df8daf4f76.tar.bz2
* pinfo.cc (pinfo::exit): Don't access self after releasing it.
* path.h (path_conv::path_conv): Fill path with native device name in case of device argument.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog6
-rw-r--r--winsup/cygwin/path.h5
-rw-r--r--winsup/cygwin/pinfo.cc5
3 files changed, 13 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 4002c94..34e5b75 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,11 @@
2005-01-13 Corinna Vinschen <corinna@vinschen.de>
+ * pinfo.cc (pinfo::exit): Don't access self after releasing it.
+ * path.h (path_conv::path_conv): Fill path with native device
+ name in case of device argument.
+
+2005-01-13 Corinna Vinschen <corinna@vinschen.de>
+
* fhandler_serial.cc (fhandler_serial::dup): Call overlapped_setup
for child, not for parent.
diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h
index 743246f..569d456 100644
--- a/winsup/cygwin/path.h
+++ b/winsup/cygwin/path.h
@@ -169,7 +169,10 @@ class path_conv
const suffix_info *suffixes = NULL) __attribute__ ((regparm(3)));
path_conv (const device& in_dev): fileattr (INVALID_FILE_ATTRIBUTES),
- path_flags (0), known_suffix (NULL), error (0), dev (in_dev) {}
+ path_flags (0), known_suffix (NULL), error (0), dev (in_dev)
+ {
+ strcpy (path, in_dev.native);
+ }
path_conv (int, const char *src, unsigned opt = PC_SYM_FOLLOW,
const suffix_info *suffixes = NULL)
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index 3782126..c9f40d0 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -140,13 +140,14 @@ pinfo::exit (DWORD n)
set_exit_state (PID_EXITED);
if (n != EXITCODE_EXEC)
self->alert_parent (0);
+ int exitcode = self->exitcode;
release ();
_my_tls.stacklock = 0;
_my_tls.stackptr = _my_tls.stack;
sigproc_printf ("Calling ExitProcess hProcess %p, n %p, exitcode %p",
- hProcess, n, self->exitcode);
- ExitProcess (self->exitcode);
+ hProcess, n, exitcode);
+ ExitProcess (exitcode);
}
# undef self