Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!hellgate.utah.edu!csn!tramp.Colorado.EDU!anstettj From: anstettj@tramp.Colorado.EDU (ANSTETT JANET S S) Newsgroups: comp.windows.x.motif Subject: Re: Child processes keep window alive after X program terminates Message-ID: <1991Feb7.200601.2069@csn.org> Date: 7 Feb 91 20:06:01 GMT References: <107@secola.Columbia.NCR.COM> Sender: news@csn.org (news) Organization: University of Colorado, Boulder Lines: 19 Nntp-Posting-Host: tramp.colorado.edu In article <107@secola.Columbia.NCR.COM> tduncan@secola.Columbia.NCR.COM (Terry S. Duncan) writes: > > I am writing a motif application which manages a unix software package. >Among other things my motif application spawns off other unix processes >(daemons) which will continue to run after the motif program is terminated. >I am using system(2) to spawn of the child processes. >The problem I am having is that after I start one of these daemons my motif >window does not go away unless all children are terminated. In other words, >the unix process terminates but the window hangs arround... What you need to do is a vfork, then in the child process, close the file descriptor associated with that window. In other words, use XtDisplay to get all the display information, then in the child do a close on fd in the display information. After this do your exec. This will allow you to exit your application before all the child processes have finished. Hope this helps. Janet Anstett