File: assertions.xml

package info (click to toggle)
posixtestsuite 1.5.2-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,440 kB
  • sloc: ansic: 117,313; xml: 7,497; sh: 1,148; makefile: 281; perl: 34
file content (78 lines) | stat: -rw-r--r-- 3,663 bytes parent folder | download | duplicates (8)
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
<assertions>
  <assertion id="1" tag="ref:XSH6:21977:21978 pt:CX">
The kill function sends a signal (sig) to a process or group of processes
(pid).
  </assertion>
  <assertion id="2" tag="ref:XSH6:21978:21980 pt:CX">
If sig is 0 (null signal), only error checking (such as to check the validity
of pid) is performed.  No signal is sent.
  </assertion>
  <assertion id="3" tag="ref:XSH6:21981:21983::22010:22011 pt:CX">
If the real or effective user ID of the sending process does not match the real
or saved set-user-ID of the receiving process (pid), the kill function
will fail with errno set to EPERM.
  </assertion>
  <assertion id="4" tag="ref:XSH6:21984:21984 pt:CX">
For pid > 0, sig is sent to process ID pid.
  </assertion>
  <assertion id="5" tag="ref:XSH6:21985:21987 pt:CX">
For pid == 0, sig is sent to all processes (except an unspecified
set of system processes) where process group ID == process group ID of sender.
The sending process must also have permission to send a signal to the
receiving process.
  </assertion>
  <assertion id="6" tag="ref:XSH6:21988:21989 pt:CX">
For pid == -1, sig is sent to all processes (except an unspecified
set of system processes).  The sending process must have permission
to send signal sig to the receiving process.
  </assertion>
  <assertion id="7" tag="ref:XSH6:21990:21992 pt:CX">
For pid below 0 and != -1, sig is sent to all processes (except
an unspecified set of system processes) where process group ID == absolute
value of pid.  The sending process must have permission to send signal
sig to the receiving process.
  </assertion>
  <assertion id="8" tag="ref:XSH6:21993:21996 pt:CX">
If it turns out that sig should be sent to the sending process (based on
pid's value), then it (or at least one pending unblocked signal)
will be sent to the sending thread before the kill() returns.  However,
if one of these is the case:
- sig is blocked for the calling thread
- another thread has sign unblocked
- another thread is waiting in a sigwait() function for sig
it will not be sent.
  </assertion>
  <assertion id="9" tag="ref:XSH6:21997:21998 pt:CX">
If SIGCONT is being sent to a process that happens to be a member of the
same session as the sending process, then the user ID tests described in
assertion 3 won't be applied.
  </assertion>
  <assertion id="10" tag="ref:XSH6:21999:22001 pt:CX">
It is allowed for an implementation to impose further restrictions on the
sending of signals (for extended security controls), including restrictions
on the null signal.  A particular example is to deny the existence of some
or all of the processes specified by the pid parameter.
  </assertion>
  <assertion id="11" tag="ref:XSH6:22002:22003::22005:22005 pt:CX">
If the process has permission to sent sig to at least one of the processes
specified by pid, then kill() is successful.  When kill() is successful,
it returns 0.
  </assertion>
  <assertion id="12" tag="ref:XSH6:22005:22006 pt:CX">
When kill() is not successful, it returns -1 and sets errno to indicate
the type of error.
  </assertion>
  <assertion id="13" tag="ref:XSH6:22009:22010 pt:CX">
The kill() function sets errno to EINVAL if the value of the sig argument
is an invalid or unsupported signal number.
  </assertion>
  <assertion id="14" tag="ref:XSH6:22010:22011 pt:CX">
The kill() function sets errno to EPERM if the process does not have
permission to send the signal to at least one receiving process.
  </assertion>
  <assertion id="15" tag="ref:XSH6:22012:22013 pt:CX">
The kill() function sets errno to ESRCH if not one process or process group
can be found corresponding to the pid parameter.
  </assertion>
</assertions>