diff options
author | Christopher Faylor <me@cgf.cx> | 2003-12-08 00:21:17 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-12-08 00:21:17 +0000 |
commit | 1c5c9a6bfb3bcfa33242904880f8880802decbb2 (patch) | |
tree | 8bc70a5ea58aec494513ac2cbfc62d48af4ba2bc | |
parent | 2e008fb91f34b5a257305a1e9e42f60fb0aef81d (diff) | |
download | newlib-1c5c9a6bfb3bcfa33242904880f8880802decbb2.zip newlib-1c5c9a6bfb3bcfa33242904880f8880802decbb2.tar.gz newlib-1c5c9a6bfb3bcfa33242904880f8880802decbb2.tar.bz2 |
* spawn.cc (spawn_guts): Change type back to 'int' after erroneous change
below.
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_tty.cc | 18 | ||||
-rw-r--r-- | winsup/cygwin/spawn.cc | 2 | ||||
-rw-r--r-- | winsup/cygwin/wait.cc | 7 |
4 files changed, 18 insertions, 14 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 062c635..0573189 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,10 @@ 2003-12-07 Christopher Faylor <cgf@redhat.com> + * spawn.cc (spawn_guts): Change type back to 'int' after erroneous + change below. + +2003-12-07 Christopher Faylor <cgf@redhat.com> + Change use of BOOL, TRUE, FALSE to bool, true, false, as appropriate, throughout. diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index a27ee58..c5718a3 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -1306,15 +1306,6 @@ fhandler_pty_master::ptsname () void fhandler_tty_common::set_close_on_exec (int val) { -#ifndef DEBUGGING - fhandler_base::set_close_on_exec (val); -#else - /* FIXME: This is a duplication from fhandler_base::set_close_on_exec. - It is here because we need to specify the "from_pty" stuff here or - we'll get warnings from ForceCloseHandle when debugging. */ - set_inheritance (get_io_handle (), val); - set_close_on_exec_flag (val); -#endif if (get_major () == DEV_TTYS_MAJOR && get_io_handle () == cygheap->ctty.get_io_handle ()) set_close_on_exec_flag (val); @@ -1332,6 +1323,15 @@ fhandler_tty_common::set_close_on_exec (int val) set_inheritance (input_mutex, val); set_inheritance (input_available_event, val); set_inheritance (output_handle, val); +#ifndef DEBUGGING + fhandler_base::set_close_on_exec (val); +#else + /* FIXME: This is a duplication from fhandler_base::set_close_on_exec. + It is here because we need to specify the "from_pty" stuff here or + we'll get warnings from ForceCloseHandle when debugging. */ + set_inheritance (get_io_handle (), val); + set_close_on_exec_flag (val); +#endif } } diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 11a3616..0e288df 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -345,7 +345,7 @@ do_cleanup (void *args) } -static bool __stdcall +static int __stdcall spawn_guts (const char * prog_arg, const char *const *argv, const char *const envp[], int mode) { diff --git a/winsup/cygwin/wait.cc b/winsup/cygwin/wait.cc index 79c8bf6..d3c3416 100644 --- a/winsup/cygwin/wait.cc +++ b/winsup/cygwin/wait.cc @@ -48,14 +48,13 @@ wait4 (int intpid, int *status, int options, struct rusage *r) int res; waitq *w; HANDLE waitfor; - bool sawsig; pthread_testcancel (); while (1) { sig_dispatch_pending (); - sawsig = 0; + bool sawsig = false; if (options & ~(WNOHANG | WUNTRACED)) { set_errno (EINVAL); @@ -73,7 +72,7 @@ wait4 (int intpid, int *status, int options, struct rusage *r) w->rusage = r; sigproc_printf ("calling proc_subproc, pid %d, options %d", w->pid, w->options); - if (!proc_subproc (PROC_WAIT, (DWORD)w)) + if (!proc_subproc (PROC_WAIT, (DWORD) w)) { set_errno (ENOSYS); paranoid_printf ("proc_subproc returned 0"); @@ -101,7 +100,7 @@ wait4 (int intpid, int *status, int options, struct rusage *r) { call_signal_handler_now (); set_sig_errno (EINTR); - sawsig = 1; + sawsig = true; res = -1; } else if (res != WAIT_OBJECT_0) |