Port-sparc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: sigpending



Manuel Bouyer a écrit :
On Tue, Apr 15, 2008 at 10:29:35PM +0200, Manuel Bouyer wrote:
Hum. When you says it always returns 0, do you mean the integer returned
by the function, or the sigset_t passed as pointer ?
Reading the man page it seems OK for the function to always return 0.

It seems I couldn't get sigpending() working either :(

I was tired when I have written this mail. Of course, on NetBSD, sigpending always returns 0. On Solaris and Linux, it can returns -1. Thus, I have written :

        if (sigpending(&set) != 0)
        {
            (*s_etat_processus).erreur_systeme = d_es_processus;
        }
        else if (sigismember(&set, SIGSTART) == 0)
        {
            while(sigismember(&set, SIGSTART) == 0)
            {
                if (sigpending(&set) != 0)
                {
                    (*s_etat_processus).erreur_systeme = d_es_processus;
                }

                nanosleep(&attente, NULL);
            }
        }

and 'set' is not modified by sigpending even if I send a blocked signal to my process.

        Regards,

        JKB


Home | Main Index | Thread Index | Old Index