repo.or.cz
/
musl.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
delete a redundant if in dynamic linker ctor execution loop
[musl.git]
/
src
/
signal
/
sigqueue.c
blob
b75f0c5cea42f7f03a23ef3f130d1c507f8c2df4
1
#include <signal.h>
2
#include <string.h>
3
#include <unistd.h>
4
#include
"syscall.h"
5
#include
"pthread_impl.h"
6
7
int
sigqueue
(
pid_t pid
,
int
sig
,
const union
sigval value
)
8
{
9
siginfo_t si
;
10
sigset_t set
;
11
int
r
;
12
memset
(&
si
,
0
,
sizeof
si
);
13
si
.
si_signo
=
sig
;
14
si
.
si_code
=
SI_QUEUE
;
15
si
.
si_value
=
value
;
16
si
.
si_uid
=
getuid
();
17
__block_app_sigs
(&
set
);
18
si
.
si_pid
=
getpid
();
19
r
=
syscall
(
SYS_rt_sigqueueinfo
,
pid
,
sig
, &
si
);
20
__restore_sigs
(&
set
);
21
return
r
;
22
}