1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

Avoid deprecated sigblock in misc/tst-pselect.c.

misc/tst-pselect.c uses the deprecated sigblock interface, resulting
in "tst-pselect.c:42:3: warning: 'sigblock' is deprecated (declared at
../signal/signal.h:189) [-Wdeprecated-declarations]".  The choice of
sigblock rather than sigprocmask has nothing to do with what this test
is testing, so this patch changes it to use sigprocmask to avoid the
warning.

Tested for x86_64.

	* misc/tst-pselect.c (do_test): Use sigprocmask instead of
	sigblock.
This commit is contained in:
Joseph Myers
2014-11-27 16:02:26 +00:00
parent 49051f8ea4
commit 6b5189eb20
2 changed files with 8 additions and 2 deletions

View File

@ -39,9 +39,12 @@ do_test (void)
return 1;
}
if (sigblock (sigmask (SIGUSR1)) != 0)
sigset_t ss_usr1;
sigemptyset (&ss_usr1);
sigaddset (&ss_usr1, SIGUSR1);
if (sigprocmask (SIG_BLOCK, &ss_usr1, NULL) != 0)
{
puts ("sigblock failed");
puts ("sigprocmask failed");
return 1;
}