diff options
author | Christopher Faylor <me@cgf.cx> | 2004-10-20 01:02:18 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2004-10-20 01:02:18 +0000 |
commit | f054a20f1ab3cedd4eed61c227e3b90bad96c93d (patch) | |
tree | 4d52bbc8fdb91e015ee519c7b7967c30bd86efaf /winsup | |
parent | f9dcc467ccff78d5de67fb6c2582731424e8da82 (diff) | |
download | newlib-f054a20f1ab3cedd4eed61c227e3b90bad96c93d.zip newlib-f054a20f1ab3cedd4eed61c227e3b90bad96c93d.tar.gz newlib-f054a20f1ab3cedd4eed61c227e3b90bad96c93d.tar.bz2 |
* fhandler_console.cc (fhandler_console::fixup_after_exec): Fix error message.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_console.cc | 8 | ||||
-rw-r--r-- | winsup/cygwin/select.cc | 11 |
3 files changed, 16 insertions, 8 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index b11e27d..968d409 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2004-10-19 Christopher Faylor <cgf@timesys.com> + + * fhandler_console.cc (fhandler_console::fixup_after_exec): Fix error + message. + 2004-10-12 Christopher Faylor <cgf@timesys.com> * select.cc (start_thread_socket): Remove unused code. diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 327219d..81f495f 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -1792,16 +1792,16 @@ fhandler_console::fixup_after_exec () cygheap->open_fhs--; /* The downside of storing this in cygheap. */ if (!open (O_NOCTTY | get_flags (), 0)) { - int sawerr = 0; + bool sawerr = false; if (!get_io_handle ()) { system_printf ("error opening input console handle after exec, errno %d, %E", get_errno ()); - sawerr = 1; + sawerr = true; } if (!get_output_handle ()) { - system_printf ("error opening input console handle after exec, errno %d, %E", get_errno ()); - sawerr = 1; + system_printf ("error opening output console handle after exec, errno %d, %E", get_errno ()); + sawerr = true; } if (!sawerr) diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index b85e0bd..ffddf62 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -1347,10 +1347,13 @@ start_thread_socket (select_record *me, select_stuff *stuff) if (_my_tls.locals.exitsock != INVALID_SOCKET) { - char buf[1]; - si->exitsock = _my_tls.locals.exitsock; - select_printf ("read a byte from %p", si->exitsock); - recv (si->exitsock, buf, 1, 0); + if (!si->exitsock) + { + char buf[1]; + si->exitsock = _my_tls.locals.exitsock; + select_printf ("read a byte from %p", si->exitsock); + recv (si->exitsock, buf, 1, 0); + } } else { |