* fhandler_console.cc (fhandler_console::fixup_after_exec): Fix error message.

This commit is contained in:
Christopher Faylor 2004-10-20 01:02:18 +00:00
parent f9dcc467cc
commit f054a20f1a
3 changed files with 16 additions and 8 deletions

View File

@ -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> 2004-10-12 Christopher Faylor <cgf@timesys.com>
* select.cc (start_thread_socket): Remove unused code. * select.cc (start_thread_socket): Remove unused code.

View File

@ -1792,16 +1792,16 @@ fhandler_console::fixup_after_exec ()
cygheap->open_fhs--; /* The downside of storing this in cygheap. */ cygheap->open_fhs--; /* The downside of storing this in cygheap. */
if (!open (O_NOCTTY | get_flags (), 0)) if (!open (O_NOCTTY | get_flags (), 0))
{ {
int sawerr = 0; bool sawerr = false;
if (!get_io_handle ()) if (!get_io_handle ())
{ {
system_printf ("error opening input console handle after exec, errno %d, %E", get_errno ()); system_printf ("error opening input console handle after exec, errno %d, %E", get_errno ());
sawerr = 1; sawerr = true;
} }
if (!get_output_handle ()) if (!get_output_handle ())
{ {
system_printf ("error opening input console handle after exec, errno %d, %E", get_errno ()); system_printf ("error opening output console handle after exec, errno %d, %E", get_errno ());
sawerr = 1; sawerr = true;
} }
if (!sawerr) if (!sawerr)

View File

@ -1347,10 +1347,13 @@ start_thread_socket (select_record *me, select_stuff *stuff)
if (_my_tls.locals.exitsock != INVALID_SOCKET) if (_my_tls.locals.exitsock != INVALID_SOCKET)
{ {
char buf[1]; if (!si->exitsock)
si->exitsock = _my_tls.locals.exitsock; {
select_printf ("read a byte from %p", si->exitsock); char buf[1];
recv (si->exitsock, buf, 1, 0); si->exitsock = _my_tls.locals.exitsock;
select_printf ("read a byte from %p", si->exitsock);
recv (si->exitsock, buf, 1, 0);
}
} }
else else
{ {