system lockup
Jim O'Connor
jim at tiamat.fsc.com
Thu Feb 16 01:42:46 AEST 1989
In article <60 at estinc.UUCP>, fnf at estinc.UUCP (Fred Fish) writes:
>
> I had a case of a program running on a Bell Technologies MPE386,
> under SCO 386 Xenix Version 2.3.1, which was causing the system
> to lock up (no response to any typing on any terminal). I finally
> tracked it down. This simple program demonstrates the problem
> on my system:
>
> static char buf [1024 * 1024];
>
> main ()
> {
> write (0, buf, sizeof (buf));
> }
Something doesn't look right here. Isn't this an attempt to write to
"stdin" which is probably not open for writing? It seems that a return
value of -1, and errno set to EBADF should be expected. As to why it
hangs the system, I don't know, but it really shouldn't matter, since I
don't think too many programs would be intentionally writing 1024 * 1024 NULL
bytes to a file desciptor for which an attempt at opening for writing
(and in this case, closing one that is already open for reading) has not been
made.
What program do you have that needs to do this?
-------------
James B. O'Connor jim at tiamat.fsc.com
Filtration Sciences Corporation 615/821-4022 x. 651
*** Altos users unite! mail to "info-altos-request at tiamat.fsc.com" ***
More information about the Comp.unix.xenix
mailing list