Article View: comp.sys.sun
Article #10853How to (re)start a process in a SunView TTY subwindow
From: David Hull
Date: Fri, 10 Feb 1989 04:50
Date: Fri, 10 Feb 1989 04:50
28 lines
1429 bytes
1429 bytes
A while ago there was some discussion about how to start a process in a
ttysw after the ttysw has already been created. I stumbled across this
while looking through the SunOS 3.4 source code. As far as I know it is
completely undocumented and may not work in later releases, though it
appears that is does still exist under SunOS 4.0.
The call you want to use is:
Tty tty;
char *argv[] = { "vi", 0 };
int pid;
...
pid = ttysw_fork_it(tty, argv);
where ttysw is the Tty that was returned by window_create(), argv is the
null-terminated list of arguments, and pid is the process id of the
process that is forked off.
I called ttysw_fork_it() in the frame's wait3 handler (set with
notify_set_wait3_func()), to restart the editor if the user quit by
mistake. As far as I know, there isn't any way to create a ttysw without
a program running in it.
I hope this is of help.
-David
Technical Details
Message-ID:
<3867@wiley.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-requestShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request From: wiley!david@uunet.uu.net (David Hull) Newsgroups: comp.sys.sun Subject: How to (re)start a process in a SunView TTY subwindow Message-ID: <3867@wiley.UUCP> Date: 10 Feb 89 04:50:42 GMT Sender: usenet@rice.edu Organization: TRW Inc., Redondo Beach, CA Lines: 28 Approved: Sun-Spots@rice.edu Original-Date: 4 Feb 89 01:54:02 GMT X-Sun-Spots-Digest: Volume 7, Issue 148, message 4 of 6