mooo!
i'm having an interesting problem with sigblock() and
system that i'm not sure how to resolve.
i want to change the following code:
oldmask = sigblock(....);
if (!(pid = fork)) {
sigsetmask(oldmask);
....
execlp(...);
}
wait()
sigsetmask(oldmask);
to not fork, and just system() instead.
however, then, i'm not sure how to restore the child's
signal mask, since i'm assuming that signal masks are
inherited during a fork().
the obvious solutions to me are:
1. wrap the system() cal:
omask = sigsetmask(oldmask)
system()
oldmask = sigsetmask(omask)
but this defeats the whole purpose of setting
up the mask in the first place.
2. just let the child process have those signals blocked, but
it's not clear to me whether this is a good thing or a bd thing.
this is basically a funciton that is invoking an
editor to edit a temp file set up by th eprogram [edquota].
any thoughts on how to resolve this? was the original sigblock needed
in the first place? [it's blocking sigint, sighup, and sigquit]
thanks.
toodlepip
marc'em.
--
---------------------------------------------------------------------------
Marc Wandschneider Seattle, WA
Barney the Dinosaur sings! You faint... Barney sings! Barney sings! --More--
You Die... --More--