Hi list

Patrick Shirkey a écrit :

>             int run = TRUE;
> 
>             while (run)
>                sleep(10000);

The easiest one for this construct is probably pause(2) instead of
sleep() with some random value, but is marked deprecated in favor of
sigsuspend(2).

>     while (run)
>         sigwait (&signals, &sig);

From manpages, sigwait(3) seems to disable signal handlers, whereas
sigsuspend(2) lets them run, use what you need though.
sigwait is threads related.

> but that also returns segv at sigwait(). If I put a printf after sigwait
> it doesn't print. Before is ok.

You must have some data still referenced after cleanup, aren't there
some callback systems you forgot to disable somewhere ?

Cheers
-- 
Nipo <[EMAIL PROTECTED]>

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to