On Thu Apr 9 2009 14:48:09 Dave Smith wrote: > Nicholas Leippe wrote: > > An opposite timeout approach could be: > > > > 1) set a flag > > 2) create a trap handler that clears the flag > > 3) do your write in backgrounded subshell, that signals the parent when > > finished > > 4) after spawning the subshell, sleep (your timeout) > > 5) then check the flag > > I think I'll try this out. How do I send a signal to the parent from the > subshell? kill? Do I need to pass the parent pid to the subshell somehow?
kill -USR1 # should do it $$ # has the pid of the current process--just pass that in to the child /* PLUG: http://plug.org, #utah on irc.freenode.net Unsubscribe: http://plug.org/mailman/options/plug Don't fear the penguin. */
