Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!usc!apple!decwrl!sgi!davea@quasar.wpd.sgi.com From: davea@quasar.wpd.sgi.com (David B. Anderson) Newsgroups: comp.sys.sgi Subject: Re: What does winopen(3G) do? Keywords: winopen sgi edge background parent child wsh Message-ID: <61189@sgi.sgi.com> Date: 30 May 90 15:46:29 GMT References: Sender: davea@quasar.wpd.sgi.com Reply-To: davea@quasar.UUCP (David B. Anderson) Distribution: na Organization: Silicon Graphics, Inc., Mountain View, CA Lines: 43 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". I am posting because it is possible this is confusing more than one person. (1) ``man foreground'' to learn how to prevent the fork. (2) On programs that fork, do (in the dbx command window) the following on startup: set $promptonfork=1 run myprog (At each fork, dbx will ask if you want to debug the child. Type yes (y) to the fork(2) which will fork the graphics process.) (dbx/edge will show the old and new process id's and will have stopped both processes at the exit of fork(2))) active $lastchild (to make commands apply to the child) (Set breakpoints as usual.) cont You can put the startup commands in a text file and read it in with pi myscript (for example) to avoid repetive typing. (Suggestion: set $pimode=1 ) (``man dbx'' and /usr/lib/dbx.help describe other ways to use $promptonfork). This ends the edge/dbx micro-tutorial Hope this helps. [ David B. Anderson Silicon Graphics (415)335-1548 davea@sgi.com ]