[linux-audio-dev] Daemon mode

Nicolas Pouillon nipo at ssji.net
Sat Dec 16 14:05:05 UTC 2006

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

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

Nipo <nipo at ssji.net>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
URL: <http://lists.linuxaudio.org/pipermail/linux-audio-dev/attachments/20061216/e3d197d6/attachment.pgp>

More information about the Linux-audio-dev mailing list