fix crash notification not being displayed if stdout has been closed

This commit is contained in:
Glenn Maynard
2004-04-09 21:02:43 +00:00
parent 061e5affb6
commit bf62e02420
@@ -349,7 +349,13 @@ static void child_process()
/* Forcibly kill our parent. */
kill( getppid(), SIGKILL );
#else
fprintf(stderr,
/* stdout may have been inadvertently closed by the crash in the parent;
* write to /dev/tty instead. */
FILE *tty = fopen( "/dev/tty", "w" );
if( tty == NULL )
tty = stdin;
fprintf(tty,
"\n"
PRODUCT_NAME " has crashed. Debug information has been output to\n"
"\n"