core files under SV
Guy Harris
guy at auspex.auspex.com
Tue Nov 21 06:25:13 AEST 1989
>There is no system or library call to do this, but you could just do
>the following:
>
> if( fork() == 0 )
> {
> abort();
> }
As long as the following causes no problems (from the SunOS 4.0
ABORT(3), but it comes from the S5 documentation and reflects S5's
implementation as well):
NAME
abort - generate a fault
...
DESCRIPTION
abort() first closes all open files if possible...
"Open files" here refers not just to file descriptors but to standard
I/O streams; i.e., buffered output will be flushed. This could cause
that buffered output to be printed twice, if it gets flushed later in
the parent as well.
More information about the Comp.unix.questions
mailing list