home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.open-look
- Path: sparky!uunet!paladin.american.edu!darwin.sura.net!mips!decwrl!csus.edu!netcom.com!kemnitz
- From: kemnitz@netcom.com (Greg Kemnitz)
- Subject: Re: Xview and process blocking?
- Message-ID: <45_nx0_.kemnitz@netcom.com>
- Date: Fri, 21 Aug 92 21:59:26 GMT
- Organization: Netcom - Online Communication Services (408 241-9760 guest)
- References: <3bbffny@openlook.Unify.Com>
- Lines: 27
-
- In article <3bbffny@openlook.Unify.Com> fgreco@shearson.com (Frank Greco) writes:
- =Does anyone have any suggestions as to how to block the parent process
- =while the child runs in an XView environment?
- =
- =The parent process is an XView application which *must* wait until the
- =child process terminates (eg, a compile). I need to have the same
- =behavior as system(); I need to fork()/exec() a shell that runs the
- =child and optionally waits/doesn't wait for the child to terminate (ie,
- =the appended '&').
- =
- =All of my current attempts have either gotten a no-waiting version,
- =or the notifier goes into an infinite loop ignoring all SIGTERM signals.
- =
- =I'm trying to be a good XView citizen and not use good 'ole system(),
- =which, btw, seems to work all the time...
- =
- =Thanks,
- =
- =Frank G.
- ==-=-=-=-=-=-=-=-=-=
- =
-
- If my memory serves me right, it is something like this,
-
- if((pid = fork()) == 0)
- do something
- wid = wait(&pid);
-