sproc(2) and winopen() together

Bron Campbell Nelson bron at bronze.wpd.sgi.com
Thu Mar 14 07:48:15 AEST 1991


In article <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).
> 
>     - 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!
> 
> It seems that after a winopen call the share group process makes its own 
> copy of the data space ? Is that so ?
> 

One possible thing to try is to call "foreground" before the first winopen.
When winopen is called, the default behaviour for the graphics library
is to "fork" the process and run the child.  If you are using sproc, you
don't want this behaviour (i.e. the forked child gets a copy of the data
and is no longer part of the process share group).  Calling foreground
will suppress the fork.

I don't know if this will cure all your ills, but it is worth investigating.

--
Bron Campbell Nelson
bron at sgi.com  or possibly  ..!ames!sgi!bron
These statements are my own, not those of Silicon Graphics.



More information about the Comp.sys.sgi mailing list