Path: utzoo!attcan!uunet!ginosko!gem.mps.ohio-state.edu!tut.cis.ohio-state.edu!ucsd!usc!bloom-beacon!CRDGW1.GE.COM!DCOOPER%ESDSDF.DECnet From: DCOOPER%ESDSDF.DECnet@CRDGW1.GE.COM Newsgroups: comp.windows.x Subject: RE: fork() and popen() ... Message-ID: <8909081357.AA25688@crdgw1.ge.com> Date: 8 Sep 89 14:48:00 GMT Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 33 Excerpt of message <1015@apctrc.UUCP> from Joe M. Wade: > > ...Everything works hunky-dory except for one > thing-the initial process dies when the quit button is pushed, > but the window doesn't go away until the spawned-off process is > also exited. > This bug has bitten me and a number of others. The problem is that the socket is not closed on exec, therefore the window does not disappear until the socket is finally closed when the process terminates. My solution was to set close-on-exec by: #include ... fcntl(ConnectionNumber(XtDisplay(toplevel)), F_SETFD, 1); where toplevel is the widget returned from XtInitialize. I submitted this problem to xbugs but it was rejected. (denial is the first step in my debugging process too :-) Dwight Cooper GE Electronic Systems Dept. dcooper%esdsdf.decnet@crd.ge.com