1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168
|
.\" Copyright (c) 2002 Michael Kerrisk <mtk.manpages@gmail.com>
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one.
.\"
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date. The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" the use of the information contained herein. The author(s) may not
.\" have taken the same level of care in the production of this manual,
.\" which is licensed free of charge, as they might when working
.\" professionally.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
.\" added note on self-signaling, aeb, 2002-06-07
.\" added note on CAP_KILL, mtk, 2004-06-16
.\"
.\" Japanese Version Copyright (c) 2002, 2005 Yuichi SATO
.\" all rights reserved.
.\" Translated 2002-08-06, Yuichi SATO <ysato@h4.dion.ne.jp>
.\" Updated & Modified 2005-01-08, Yuichi SATO <ysato444@yahoo.co.jp>
.\" Updated 2007-09-08, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.64
.\"
.TH SIGQUEUE 2 2007-07-26 "Linux" "Linux Programmer's Manual"
.SH ̾
sigqueue, rt_sigqueueinfo \- ʥȥǡץ
.SH
.B #include <signal.h>
.sp
.BI "int sigqueue(pid_t " pid ", int " sig ", const union sigval " value );
.sp
.in -4n
glibc εǽޥ
.RB ( feature_test_macros (7)
):
.in
.sp
.BR sigqueue ():
_POSIX_C_SOURCE\ >=\ 199309L
.SH
.BR sigqueue ()
.I sig
ǻꤵ줿ʥPID
.I pid
Ǥץ롣
ʥΤɬפʸ¤
.BR kill (2)
ƱǤ롣
.BR kill (2)
Ʊͤˡ̥롦ʥ (0) Ȥä
ꤷ PID Υץ¸ߤ뤫å뤳ȤǤ롣
.PP
.I value
ϥʥȰǡ°ƥꤹ롣
.I value
(ޤϥݥͤǤ) ʲΤ褦ʷǤ롣
.sp
.in +4n
.nf
union sigval {
int sival_int;
void *sival_ptr;
};
.fi
.in
ΥץˡΥʥФϥɥ
.RB ( sigaction (2)
.B SA_SIGINFO
ꤷ) ȡ뤷Ƥȡ
Υϥɥ 2 Ϥ
.I siginfo_t
¤Τ
.I si_value
եɤˤäơΥǡǤ롣
ˡι¤Τ
.I si_code
եɤ
.B SI_QUEUE
ꤵ롣
.SH ֤
硢
.BR sigqueue ()
0 ֤
ϼ¦ץԤ
ʥ뤬줿Ȥ
Ԥ \-1 ֤졢
.I errno
顼ɽͤꤵ롣
.SH 顼
.TP
.B EAGAIN
Ԥ륷ʥκã
(ܤ
.BR signal (7)
Ȥ뤳)
.TP
.B EINVAL
.I sig
Ǥ롣
.TP
.B EPERM
Υץˤϡ¦ץ˥ʥ븢¤ʤ
ɬפʸ¤ˤĤƤϡ
.BR kill (2)
Ȥ뤳ȡ
.TP
.B ESRCH
.I pid
˥ޥå PID Υץʤ
.SH С
Υƥॳ Linux 2.2 ǽо줷
.SH
POSIX.1-2001.
.SH
δؿƤӽФץˤδؿʥäȤˡ
ʥ뤬ƤӽФ¦åɤ˥֥å줺
(ʥ뤬֥åʤäޤ
.BR sigwait (3)
ѤΤԤäƤ뤳Ȥˤ)
Υʥåɤʤϡ
δؿˡʤȤ
ΥåɤФƥʥ뤬ƤʤФʤʤ
Linux ǤϡƤӽФ륷ƥॳ̾ϼºݤˤ
.BR rt_sigqueueinfo ()
Ǥ롣
.BR rt_sigqueueinfo ()
Ǥ 3 ܤΰ˰㤤ꡢ
.I siginfo_t
¤ΤǤ롣
.I siginfo_t
¤ΤϡʥץΥʥϥɥϤ줿ꡢ
ʥץ
.BR sigtimedwait (2)
ƥॳ뤫֤줿ꤹ롣
glibc
.BR sigqueue ()
åѡؿǤϡ
ΰ
.I info
ϰʲΤ褦˽롣
.in +4n
.nf
info.si_signo = sig; /* argument supplied to sigqueue() */
info.si_code = SI_QUEUE;
info.si_pid = getpid(); /* Process ID of sender */
info.si_uid = getuid(); /* Real UID of sender */
info.si_value = val; /* argument supplied to sigqueue() */
.fi
.in
.SH Ϣ
.BR kill (2),
.BR sigaction (2),
.BR signal (2),
.BR sigwait (3),
.BR signal (7)
|