Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!ucsd!ucbvax!decwrl!sgi!shinobu!odin!texas.esd.sgi.com!robert From: robert@texas.esd.sgi.com (Robert Skinner) Newsgroups: comp.sys.sgi Subject: Re: What does winopen(3G) do? Keywords: winopen sgi edge background parent child wsh Message-ID: <8274@odin.corp.sgi.com> Date: 30 May 90 22:45:40 GMT References: Sender: news@odin.corp.sgi.com Reply-To: robert@sgi.com Distribution: na Organization: Silicon Graphics Inc., Entry Systems Division Lines: 40 In article , broderic@genesis.rutgers.edu (Alfred J. Broderick) writes: |> |> It seems that all programs that use winopen(3G) (including `wsh`) |> run in the background but do not show up in the when you type `jobs`. |> How does this work? Is there any way to debug programs that use |> winopen with `edge`? Whenever I try to use `edge` to debug a program |> that uses winopen, my program runs to completion before edge is able |> to do a "stop at". |> |> Any help and explainations will be appreciated. |> |> Alfred Broderick |> broderic@topaz.rutgers.edu |> -- |> Alfred++ by default, winopen does a fork(), creating a running copy of your program, then the original program terminates. Issue the foreground() call before you do any winopen()'s, if this is not what you want. Since this is often useful for debugging, a common trick is to issue the foreground call if the DEBUG environment variable is set, like this: if( getenv( "DEBUG" ) ) foreground(); -- so you don't have to recompile to have it run in the foreground for debugging. Robert Skinner robert@sgi.com "The words of the prophets were written on the subway walls" - Simon & Garfunkel