DOKK / manpages / debian 11 / manpages-fr-dev / sigsuspend.2.fr
SIGSUSPEND(2) Manuel du programmeur Linux SIGSUSPEND(2)

sigsuspend, rt_sigsuspend - wait for a signal

#include <signal.h>

int sigsuspend(const sigset_t *mask);

Exigences de macros de test de fonctionnalités pour la glibc (consulter feature_test_macros(7)) :

sigsuspend(): _POSIX_C_SOURCE

sigsuspend() temporarily replaces the signal mask of the calling thread with the mask given by mask and then suspends the thread until delivery of a signal whose action is to invoke a signal handler or to terminate a process.

Si le signal termine le processus, sigsuspend() ne retourne pas à l'appelant. Si le signal est intercepté, sigsuspend() retourne après l'exécution du gestionnaire, et le masque de signaux bloqués est restauré à sa valeur précédant l'appel à sigsuspend().

It is not possible to block SIGKILL or SIGSTOP; specifying these signals in mask, has no effect on the thread's signal mask.

sigsuspend() renvoie toujours -1, et errno est normalement positionné à EINTR.

mask pointe en-dehors de l'espace d'adressage accessible.
The call was interrupted by a signal; signal(7).

POSIX.1-2001, POSIX.1-2008.

En général, sigsuspend() est utilisé conjointement avec sigprocmask(2) pour empêcher l'arrivée d'un signal pendant l'exécution d'une section de code critique. L'appelant commence par bloquer les signaux avec sigprocmask(2). Après la fin de la section critique, l'appelant attend les signaux avec sigsuspend() utilisé avec le masque renvoyé par sigprocmask(2) (dans l'argument oldset).

Consultez sigsetops(3) pour les détails concernant les ensembles de signaux.

The original Linux system call was named sigsuspend(). However, with the addition of real-time signals in Linux 2.2, the fixed-size, 32-bit sigset_t type supported by that system call was no longer fit for purpose. Consequently, a new system call, rt_sigsuspend(), was added to support an enlarged sigset_t type. The new system call takes a second argument, size_t sigsetsize, which specifies the size in bytes of the signal set in mask. This argument is currently required to have the value sizeof(sigset_t) (or the error EINVAL results). The glibc sigsuspend() wrapper function hides these details from us, transparently calling rt_sigsuspend() when the kernel provides it.

kill(2), pause(2), sigaction(2), signal(2), sigprocmask(2), sigwaitinfo(2), sigsetops(3), sigwait(3), signal(7)

Cette page fait partie de la publication 5.10 du projet man-pages Linux. Une description du projet et des instructions pour signaler des anomalies et la dernière version de cette page peuvent être trouvées à l'adresse https://www.kernel.org/doc/man-pages/.

La traduction française de cette page de manuel a été créée par Christophe Blaess <https://www.blaess.fr/christophe/>, Stéphan Rafin <stephan.rafin@laposte.net>, Thierry Vignaud <tvignaud@mandriva.com>, François Micaux, Alain Portal <aportal@univ-montp2.fr>, Jean-Philippe Guérard <fevrier@tigreraye.org>, Jean-Luc Coulon (f5ibh) <jean-luc.coulon@wanadoo.fr>, Julien Cristau <jcristau@debian.org>, Thomas Huriaux <thomas.huriaux@gmail.com>, Nicolas François <nicolas.francois@centraliens.net>, Florentin Duneau <fduneau@gmail.com>, Simon Paillard <simon.paillard@resel.enst-bretagne.fr>, Denis Barbier <barbier@debian.org>, David Prévot <david@tilapin.org>, Cédric Boutillier <cedric.boutillier@gmail.com> et Frédéric Hantrais <fhantrais@gmail.com>

Cette traduction est une documentation libre ; veuillez vous reporter à la GNU General Public License version 3 concernant les conditions de copie et de distribution. Il n'y a aucune RESPONSABILITÉ LÉGALE.

Si vous découvrez un bogue dans la traduction de cette page de manuel, veuillez envoyer un message à debian-l10n-french@lists.debian.org.

6 mars 2019 Linux