Path: utzoo!news-server.csri.toronto.edu!bonnie.concordia.ca!ccu.umanitoba.ca!herald.usask.ca!alberta!aunro!aupair.cs.athabascau.ca!atha!decwrl!sgi!shinobu!odin!flobb4!micah From: micah@flobb4.csd.sgi.com (Micah Altman) Newsgroups: comp.sys.sgi Subject: Re: sproc(2) and winopen() together Keywords: share group processes Message-ID: <1991Mar13.221839.6301@odin.corp.sgi.com> Date: 13 Mar 91 22:18:39 GMT References: <7858@biophys.zir.ethz.ch> Sender: news@odin.corp.sgi.com (Net News) Organization: Silicon Graphics, Inc. Mountain View, CA Lines: 38 In <7858@biophys.zir.ethz.ch> messerli@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@csd.sgi.com Phone (415) 335-1866 FAX (415) 965-2309 Disclaimer: Everything in this document is a lie.