Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uunet!bu.edu!snorkelwacker!paperboy!osf.org!dbrooks From: dbrooks@osf.org (David Brooks) Newsgroups: comp.windows.x.motif Subject: Re: system, motif Keywords: system, xterm, motif Message-ID: <1990Sep24.163416@osf.org> Date: 24 Sep 90 20:34:16 GMT References: <188@sysauto.UUCP> Sender: news@OSF.ORG Reply-To: dbrooks@osf.org (David Brooks) Distribution: usa Organization: Open Software Foundation Lines: 24 In article <188@sysauto.UUCP>, olu@sysauto.UUCP (Olumide O. Emuleomo) writes: |> From within my code, if I do I do a system("xterm -e foo &"); |> where foo is an X program, the menus in the current window of the |> "parent" process disappear and cannot be redrawn! |> Also that "parent" window can no longer be closed (with ALT-F4)! (I redirected from "poster" because this is quite a common problem). You don't say, but I guess the parent program has exited, leaving its children as orphans. You are running into the shared-fd experience, and you need to arranged that the parent's file descriptors get closed on exec. Otherwise the server gets confused. There are several ways of training the display fd to close at the right time. I do this immediately after initializing the toolkit: #include fcntl(ConnectionNumber(XtDisplay(toplevel)), F_SETFD, 1); This probably belongs in the FAQ (is xug listening?). -- David Brooks dbrooks@osf.org Systems Engineering, OSF uunet!osf.org!dbrooks "A Loaf of Bread, a Jug of Wine, and Six Spades Redoubled -- Omar somebody.