cant@mrmarx.msc.com (Jim Cant) (06/18/91)
Here is a question dealing with Xwindows (Motif, actually) under AIX on a RS6000. I have an monitor program whose role in life is to start a (arbitrary) number of applications as child processes (fork/exec paradigm), then wait and when one of them dies, restart it. It keeps track of the children by the process IDs returned by fork. When its time to quit, the monitor program sends a signal to each child which is trapped so the children can exit gracefully. I would like to run each application in a separate window by having the exec calls of the children run aixterm with the -c switch to start the application in the window. Which works fine. The rub is that I can't gracefully kill the children, which are the aixterm processes. It seems that aixterm ignores SIGTERM; all that it cares about is SIGKILL. So... is there any way to make aixterm pay attention to other signals AND to pass a friendly signal on the the application it is running? (I can get the job done by having the "grandchild", i.e. the application, send a message via a pipe or message queue to the "grandparent", i.e. the monitor program, telling it its process ID so it could be killed 'directly' but this seems cumbersome.) Is there an elegant way to do this or am I stuck with the inflexibility of aixterm?. Might there be a system call the monitor could make which given a process ID (of the aixterm) would return process ID(s) of the the children (the application is this case?). Thanks for all your wise and helpfuls suggestions I know you are dying to send my way. Jim Cant, cant@mrmarx.msc.com I don't care what the company thinks Mainstream Software Corp. about what I think or say nearly as much 411 Waverly Oaks Road I care about how my boy responds to same. Waltham MA 02154, 617-894-3399