mumit@garfield.cs.wisc.edu (Mumit Khan) (09/09/90)
Hi: Is there any way (under BSD derived U*x) to find the pid of the child processes that are stopped due to SIGTTIN, SIGTTOU, SIGSTP and SIGSTOP? Here's the problem: I have an X-based environment where a user configures the applications to be run, and then uses a menu-button to run it. I'm installing a handler for SIGCHLD for each child that I'm running and then going off to do my thing. Whenever a child exits, my handler is called and everything is great (since I get the pid from wait/wait3). But, the handler is also called in case any of the child processes receive the 4 signals above and in this case wait3() returns 0 (not the pid). This is usually the case when a child wants to read from stdin (bad!). My policy is to kill such a child and let the user know, since the applications to be wrapped in this environment are not supposed to read standard input. But I CAN'T seem to find the pid, and of course, can't kill the damn thing. OS: Ultrix 3.1 CPU: DecStation 3100 Any ideas??? Am I missing something very obvious??? Help appreciated. Mumit -- khan@xraylith.wisc.edu