Article View: comp.sys.sun
Article #11134Re: problem using sunview window + reading tty from a child process
From: Mark D. Baushke
Date: Thu, 23 Feb 1989 13:44
Date: Thu, 23 Feb 1989 13:44
67 lines
2656 bytes
2656 bytes
Please note that due to an apparent time warp of some kind, my original
question was published after its solution was published.
The original question was in
Sun-Spots Digest: Volume 7, Issue 153, message 2 of 16
the solution was published in
Sun-Spots Digest: Volume 7, Issue 144, message 5 of 9
If possible, please either delete sunviewhelp.shar or include the solution
in that file.
[[ I wonder how that happened. Sorry for the confusion. I have removed
the shar file. --wnl ]]
Problem/solution summary:
Using stdin before creating a window and then again after the
window no longer existed from a child process was not working.
The problem is that sunview programs change process groups in
the first call to window_create(). The work around should be
something like this:
int saved_pgrp;
saved_pgrp = getpgrp(getpid());
frame = window_create (NULL,FRAME,0);
setpgrp(getpid(), saved_pgrp);
Thank you for anyone who may have obtained the shar file to try and help
me out.
Mark D. Baushke Internet: mdb%silvlis.com@sun.com
Silvar-Lisco, Inc. Nameservers: mdb@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....
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
Technical Details
Message-ID:
<8902141733.AA17970@amadeus.silvlis.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-requestShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request From: mdb@silvlis.com (Mark D. Baushke) Newsgroups: comp.sys.sun Subject: Re: problem using sunview window + reading tty from a child process Message-ID: <8902141733.AA17970@amadeus.silvlis.com> Date: 23 Feb 89 13:44:20 GMT Sender: usenet@rice.edu Organization: Sun-Spots Lines: 67 Approved: Sun-Spots@rice.edu Original-Date: Tue, 14 Feb 89 09:33:18 PST X-Sun-Spots-Digest: Volume 7, Issue 169, message 4 of 12