sigblock and system() under 4.3bsd

sigblock and system() under 4.3bsd

Post by Marc WANDSCHNEID » Mon, 17 Jan 1994 14:26:13



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--

 
 
 

1. sigblock system call

Hi everybody,
I'm writing some code in which I have the system call "sigblock". The problem is that I can't find
the library where there is this function, so the linking doesn't work.
Any suggestion?
Thanks.
Bye

2. Q: Xmail under Solaris 2.3

3. Matrox Mystique ands X.

4. MOL and TCP/IP

5. sigblock() problem

6. on PID, PPID, how to find processes etc..

7. select and sigblock

8. The Black Hat Briefings Security Conference final announcement - July 29-30th

9. <signal.h> doesn't include 'sigblock'

10. sigblock, sigpause...

11. Need help with SIGBLOCK ()

12. sigblock

13. sigblock,sigmask,sigsetmask ... for SYS V?