What does winopen(3G) do?

Robert Skinner robert at texas.esd.sgi.com
Thu May 31 08:45:40 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".
|> 
|> Any help and explainations will be appreciated.
|> 
|> Alfred Broderick
|> broderic at 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 at sgi.com

	"The words of the prophets were written on the subway walls"  
	
			- Simon & Garfunkel



More information about the Comp.sys.sgi mailing list