sproc(2) and winopen() together

Micah Altman micah at flobb4.csd.sgi.com
Thu Mar 14 08:18:39 AEST 1991


In <7858 at biophys.zir.ethz.ch> messerli at biophys.zir.ethz.ch (Marius Messerli) writes:


>I'm trying to get a piece of code using sproc(2) together with winopen().
>The program consists of a process handler with no connection to the 
>graphics master, a graphical user_interface and the application suroutines 
>that have their own windows. 

>I have two main problems:

>    - As soon as a share group process opens a connection to the graphics 
>      master (does winopen call) it cannot change the global variables 
>      "backward" so that the process handler gets them.
>      To give the user_interface the possibility to tell the 
>      process handler what to I use a pipe (although globals would be 
>      more appropriate).

Best guest: The first winopen() actually creates a separate process when called,
	and kills the original process . This can confuse some
	multiprocessing window handling, signal handling,etc.
 Do the winopen() first, before creating any child processes
using sproc(), this should keep things from getting confused. Or use
the foreground() call before doing your first  winopen().

>    - Although having set the PR_SALL flag in all sporc calls the individual 
>      application subroutines (each having its own window) do have their 
>      own copy of the data!

Even using PR_SALL, subroutines will have individual copies of their
own _local_ data ( data declared within the scope of the subroutine ),
global data ( COMMON's in Fortran ) are shared between all threads.

Hope this helps.
--
	"Entia non sunt multiplicanda sine necessitate." - William of Ockham
	Micah Altman, "Computational Juggler"	   	   micah at csd.sgi.com
	Phone (415) 335-1866				   FAX (415) 965-2309
	Disclaimer: 	Everything in this document is a lie.	



More information about the Comp.sys.sgi mailing list