On Monday 14 May 2012 03:33:58 Michael Haubenwallner wrote:
> On 05/11/2012 06:39 PM, Mike Frysinger wrote:
> > +multijob_child_init() {
> > + trap 'echo ${BASHPID} $? >&'${mj_control_fd} EXIT
> > + trap 'exit 1' INT TERM
> > +}
>
> Just wondering why $! in parent isn't used anywhere, even not for some
> integrity check if the child's BASHPID actually was forked by parent.i don't know of any cases where this would error out. if there are too many processes, bash itself will retry a few times before aborting. so checking $! wouldn't help. keep in mind, what you're proposing is basically checking the return value of fork(), and that can fail in very few ways. all of which, afaik, bash does not bubble up to the script. -mike
signature.asc
Description: This is a digitally signed message part.
