JARMOLOWSKI%ESDSDF.decnet@crdgw1.ge.com (Tom Jarmolowski) (07/19/89)
The following simple program will cause a Sun to hang in a bizarre state. We have seen this behavior on Sun 3s and 4s under SunOS 3.x and 4.x. After a few hundred iterations of the loop (a random number, usually around 250). Strange things happen. Most programs executed from a tty or pty hang. New programs can be started from a mouse menu and USUALLY work if they do not use a pty. Does anyone have any idea what is wrong ? P.S. It makes no difference if anything is connected to ttyb or not. #include <stdio.h> #include <fcntl.h> main() { int fd; int count = 0; while (1) { fd = open("/dev/ttyb", O_RDWR); write(fd, "junk", 4); /************************************************/ /* The next line is not required for the */ /* bug to occur */ /************************************************/ printf("%d\n", count++); close(fd); } } Tom Jarmolowski jarmolowski%esdsdf.decnet@ge-crd.arpa