Re: Latest kernel source

Joerg Pommnitz (Joerg@raleigh.ibm.com)
Thu, 27 Feb 1997 07:19:31 -0500


Richard B. Johnson wrote:
> o The following program works "fine" without producing any errors
> or a core-dump. Core dumps are enabled.
>
> main()
> {
> if(read(0, NULL, 1) < 0)
> perror("");
> }
> The 'C' runtime library is 5.2.18.
>
> o The following program also works "fine" without producing any
> errors or a core-dump.
> main()
> {
> if(write(1, NULL, 10) != 10)
> perror("");
> }

This is OK. It's not supposed to core dump or to do anything useful
at all. Programs like this used to generate annoying "Exception at"
messages, but the priority of this message has been changed to DEBUG.
If you want to see them, tell your klogd to show them.

Anyway, the current behaviour is completely in spec. POSIX only
specifies what happens with correct programs.

Best regards
Joerg

--
Joerg Pommnitz   |Joerg@Raleigh.ibm.com| Never attribute to malloc 
Mobile/Wireless  |Dept UMRA            | that which can be adequately
T/L (919)254-6397|Office B502/E117     | explained by stupidity.