Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!sdd.hp.com!hp-pcd!hpfcso!stroyan From: stroyan@hpfcso.HP.COM (Mike Stroyan) Newsgroups: comp.sys.hp Subject: Re: stdout problems on HP/UX 6.5 Message-ID: <7370148@hpfcso.HP.COM> Date: 1 Jun 90 17:28:32 GMT References: <22441@dartvax.Dartmouth.EDU> Organization: Hewlett-Packard, Fort Collins, CO, USA Lines: 20 > All our applications run under X windows (currently > running all R4 binaries and using the corresponding > libraries. Our applications fork off a window and then > exit. For example, > Ok, now here comes the problem. When the child tries > to print to stdout, the application window disappears. Your child process is receiving a SIGKILL resulting from a SIGTTOU signal to a process with parent process id 1. You have "stty tostop" set on your tty, indicating that background processes should be stopped when they write to the tty. As described in signal(5), the stop action is changed to a SIGKILL for children of init. I suppose the designers felt that an orphan didn't have much hope of being woken up again. You can prevent this behaviour by setting "stty -tostop" or by the equivalent ioctl call on stdout. Or you can ignore the suspend signal by calling "signal(SIGTTOU, SIG_IGN);" after forking the child. Mike Stroyan, stroyan@hpfcla.hp.com