* signal.cc (_raise): New function.

* exceptions.cc (unused_sig_wrapper): Remove _raise.
* sigproc.h (class sigframe): Default frames to skip to zero or suffer from
exuberant optimization.
* fhandler_tty.cc (fhandler_tty::write): Set appropriate errno when WriteFile
to pipe fails.
This commit is contained in:
Christopher Faylor
2000-08-29 02:06:49 +00:00
parent 1b38471e5e
commit d824bcf985
5 changed files with 25 additions and 14 deletions

View File

@@ -568,9 +568,17 @@ fhandler_tty_slave::write (const void *ptr, size_t len)
if (WriteFile (get_output_handle (), buf, n, &n, NULL) == FALSE)
{
DWORD err = GetLastError ();
termios_printf ("WriteFile failed, %E");
towrite = (DWORD) -1;
switch (err)
{
case ERROR_NO_DATA:
err = ERROR_IO_DEVICE;
default:
__seterrno ();
}
_raise (SIGHUP); /* FIXME: Should this be SIGTTOU? */
towrite = (DWORD) -1;
break;
}