What does winopen(3G) do?

David B. Anderson davea at quasar.wpd.sgi.com
Thu May 31 01:46:29 AEST 1990


In article <May.29.20.11.19.1990.700 at genesis.rutgers.edu> broderic at 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 at sgi.com ]



More information about the Comp.sys.sgi mailing list