problem using sunview window + reading tty from a child process

Mark D. Baushke mdb at silvlis.com
Thu Feb 9 06:44:44 AEST 1989


I received the following reply from Sun Software support which solves my
problem.

If you have not yet packaged my question into a sun-spots, please consider
either adding this information or omitting the question entirely.

Thank you,

Mark D. Baushke                 Internet:    mdb%silvlis.com at sun.com
Silvar-Lisco, Inc.              Nameservers: mdb at silvlis.com
1080 Marsh Road                 Usenet:      {pyramid,sgi,sun}!silvlis!mdb
Menlo Park, CA 94025-1053       Telephone:   +1 415 853-6411 / +1 415 969-8328

---------- Forwarded message From: sun!hvr (Heather Rose)

Mark,

The problem you're running into is that sunview programs change process
groups in the first call to window_create().  You can work around this
with something like this:

        int saved_pgrp;
        saved_pgrp = getpgrp(getpid());

        frame = window_create (NULL,FRAME,0);

        setpgrp(getpid(), saved_pgrp);

For just your first call to window_create().  Please try this and if it
does not work out for you, please get back to me by 1/31/89.  If I do not
hear back from before before this time, I will assume all is working and
close the service order 263289.

Also, if you use vfork instead you can save on some temporary swap space. 
See the man page on fork.

Regards,

Heather Rose
U.S. Answer Center

---------- end Forwarded message



More information about the Comp.sys.sun mailing list