Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!ucdavis!csusac!unify!openlook!openlook-request From: fgreco@fis1026.govt.shearson.com (Frank Greco) Newsgroups: comp.windows.open-look Subject: Re: Questions about the XView notifier Message-ID: Date: 26 Jun 91 13:58:45 GMT Sender: news@Unify.Com Lines: 41 > >How hard is the restriction "you should not use the following system calls" > >, where the calls are for instance signal,system and so on? The manual uses > > the same expression (you should not) when talking about some signals to avoid, > > for instance SIGIO,SIGALRM and so on. > > Since the notifier library provides an alternate interface to all of the > restricted functionality, avoiding it is not a problem. There is not a substitute for system(). System() does call signal() and wait() internally, so it should be replaced with a notifier version. There is a fork-type of pgm in the XVPM, but a lot of app pgmrs need the shell's help to run a pgm. Although I've found that good 'ole system() seems to work practically all the time, I understand the need to avoid the magical system calls with the notifier. So I started to write a version of system() that's a good notifier citizen (and uses whatever's in $SHELL instead of always using /bin/sh). I encountered a few stumbling blocks: 1. How do you simulate the blocking nature of system()? ie, if you don't bg the string, vanilla system() will tell the parent to wait under the child dies. You can't do this in a windowing environment; the app would be frozen until the child dies. I guess I could write an xvsystem() that passes, along with the string, a ptr to a wait fn. But how do I ignore all events everything until the child dies? (FRAME_BUSY doesn't ignore events...) 2. Is it possible (perhaps prudent...) to write a toolkit independent version of system()? Suppose a home grown library uses system() to rsh a pgm (it waits for the child). Now is it more appropriate to write a little library of routines like system(), signal(), etc... that is linked in if, say XView is used? Any suggestions anyone? Thanks again all, Frank G.