OpenCoverage

kill.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/coreutils/src/src/kill.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2static char const short_options[] =-
3 "0::1::2::3::4::5::6::7::8::9::"-
4 "A::B::C::D::E::F::G::H::I::J::K::M::"-
5 "N::O::P::Q::R::S::T::U::V::W::X::Y::Z::"-
6 "Lln:s:t";-
7-
8static struct option const long_options[] =-
9{-
10 {"list", -
11 0-
12 , -
13 ((void *)0)-
14 , 'l'},-
15 {"signal", -
16 1-
17 , -
18 ((void *)0)-
19 , 's'},-
20 {"table", -
21 0-
22 , -
23 ((void *)0)-
24 , 't'},-
25 {"help", -
26 0-
27 , -
28 ((void *)0)-
29 , GETOPT_HELP_CHAR},-
30 {"version", -
31 0-
32 , -
33 ((void *)0)-
34 , GETOPT_VERSION_CHAR},-
35 {-
36 ((void *)0)-
37 , 0, -
38 ((void *)0)-
39 , 0}-
40};-
41-
42void-
43usage (int status)-
44{-
45 if (status !=
status != 0Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 2 times by 1 test
Evaluated by:
  • kill
2-8
46 0
status != 0Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 2 times by 1 test
Evaluated by:
  • kill
2-8
47 )-
48 do { fprintf (-
49 stderr-
50 , -
51 dcgettext (((void *)0), -
52 "Try '%s --help' for more information.\n"-
53 , 5)-
54 , program_name); }
executed 8 times by 1 test: end of block
Executed by:
  • kill
while (0);
8
55 else-
56 {-
57 printf (-
58 dcgettext (((void *)0), -
59 "Usage: %s [-s SIGNAL | -SIGNAL] PID...\n or: %s -l [SIGNAL]...\n or: %s -t [SIGNAL]...\n"-
60 , 5)-
61-
62-
63-
64 -
65 ,-
66 program_name, program_name, program_name);-
67 fputs_unlocked (-
68 dcgettext (((void *)0), -
69 "Send signals to processes, or list signals.\n"-
70 , 5)-
71 ,-
72 stdout-
73 )-
74-
75 ;-
76-
77 emit_mandatory_arg_note ();-
78-
79 fputs_unlocked (-
80 dcgettext (((void *)0), -
81 " -s, --signal=SIGNAL, -SIGNAL\n specify the name or number of the signal to be sent\n -l, --list list signal names, or convert signal names to/from numbers\n -t, --table print a table of signal information\n"-
82 , 5)-
83 ,-
84 stdout-
85 )-
86-
87-
88-
89-
90 ;-
91 fputs_unlocked (-
92 dcgettext (((void *)0), -
93 " --help display this help and exit\n"-
94 , 5)-
95 ,-
96 stdout-
97 );-
98 fputs_unlocked (-
99 dcgettext (((void *)0), -
100 " --version output version information and exit\n"-
101 , 5)-
102 ,-
103 stdout-
104 );-
105 fputs_unlocked (-
106 dcgettext (((void *)0), -
107 "\nSIGNAL may be a signal name like 'HUP', or a signal number like '1',\nor the exit status of a process terminated by a signal.\nPID is an integer; if negative it identifies a process group.\n"-
108 , 5)-
109 ,-
110 stdout-
111 )-
112-
113-
114-
115 ;-
116 printf (-
117 dcgettext (((void *)0), -
118 "\n" "NOTE: your shell may have its own version of %s, which usually supersedes\n" "the version described here. Please refer to your shell's documentation\n" "for details about the options it supports.\n"-
119 , 5)-
120 , "kill");-
121 emit_ancillary_info ("kill");-
122 }
executed 2 times by 1 test: end of block
Executed by:
  • kill
2
123 exit (status);
executed 10 times by 1 test: exit (status);
Executed by:
  • kill
10
124}-
125-
126-
127-
128-
129-
130static void-
131print_table_row (int num_width, int signum,-
132 int name_width, char const *signame)-
133{-
134 char const *description = strsignal (signum);-
135 printf ("%*d %-*s %s\n", num_width, signum, name_width, signame,-
136 description ? description : "?");-
137}
executed 126 times by 1 test: end of block
Executed by:
  • kill
126
138-
139-
140-
141-
142-
143static int-
144list_signals (-
145 _Bool -
146 table, char *const *argv)-
147{-
148 int signum;-
149 int status = -
150 0-
151 ;-
152 char signame[(sizeof "SIGRTMAX" + (((((sizeof (int) * 8) - (! ((__typeof__ (int)) 0 < (__typeof__ (int)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (int)) 0 < (__typeof__ (int)) -1))) - 1)];-
153-
154 if (table
tableDescription
TRUEevaluated 3 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 7 times by 1 test
Evaluated by:
  • kill
)
3-7
155 {-
156 unsigned int name_width = 0;-
157-
158-
159 unsigned int num_width = 1;-
160 for (signum = 1; signum <= (
signum <= ( 65 - 1) / 10Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 3 times by 1 test
Evaluated by:
  • kill
3
161 65
signum <= ( 65 - 1) / 10Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 3 times by 1 test
Evaluated by:
  • kill
3
162 - 1) / 10
signum <= ( 65 - 1) / 10Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 3 times by 1 test
Evaluated by:
  • kill
; signum *= 10)
3
163 num_width++;
executed 3 times by 1 test: num_width++;
Executed by:
  • kill
3
164-
165-
166 for (signum = 1; signum <= (
signum <= ( 65 - 1)Description
TRUEevaluated 192 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 3 times by 1 test
Evaluated by:
  • kill
3-192
167 65
signum <= ( 65 - 1)Description
TRUEevaluated 192 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 3 times by 1 test
Evaluated by:
  • kill
3-192
168 - 1)
signum <= ( 65 - 1)Description
TRUEevaluated 192 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 3 times by 1 test
Evaluated by:
  • kill
; signum++)
3-192
169 if (sig2str (signum, signame) == 0
sig2str (signum, signame) == 0Description
TRUEevaluated 186 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 6 times by 1 test
Evaluated by:
  • kill
)
6-186
170 {-
171 size_t len = strlen (signame);-
172 if (name_width < len
name_width < lenDescription
TRUEevaluated 15 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 171 times by 1 test
Evaluated by:
  • kill
)
15-171
173 name_width = len;
executed 15 times by 1 test: name_width = len;
Executed by:
  • kill
15
174 }
executed 186 times by 1 test: end of block
Executed by:
  • kill
186
175-
176 if (argv
argvDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • kill
FALSEevaluated 2 times by 1 test
Evaluated by:
  • kill
)
1-2
177 for (; *
*argvDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 1 time by 1 test
Evaluated by:
  • kill
argv
*argvDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 1 time by 1 test
Evaluated by:
  • kill
; argv++)
1-2
178 {-
179 signum = operand2sig (*argv, signame);-
180 if (signum < 0
signum < 0Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • kill
)
0-2
181 status =
never executed: status = 1 ;
0
182 1
never executed: status = 1 ;
0
183 ;
never executed: status = 1 ;
0
184 else-
185 print_table_row (num_width, signum, name_width, signame);
executed 2 times by 1 test: print_table_row (num_width, signum, name_width, signame);
Executed by:
  • kill
2
186 }-
187 else-
188 for (signum = 1; signum <= (
signum <= ( 65 - 1)Description
TRUEevaluated 128 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 2 times by 1 test
Evaluated by:
  • kill
2-128
189 65
signum <= ( 65 - 1)Description
TRUEevaluated 128 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 2 times by 1 test
Evaluated by:
  • kill
2-128
190 - 1)
signum <= ( 65 - 1)Description
TRUEevaluated 128 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 2 times by 1 test
Evaluated by:
  • kill
; signum++)
2-128
191 if (sig2str (signum, signame) == 0
sig2str (signum, signame) == 0Description
TRUEevaluated 124 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 4 times by 1 test
Evaluated by:
  • kill
)
4-124
192 print_table_row (num_width, signum, name_width, signame);
executed 124 times by 1 test: print_table_row (num_width, signum, name_width, signame);
Executed by:
  • kill
124
193 }
executed 3 times by 1 test: end of block
Executed by:
  • kill
3
194 else-
195 {-
196 if (argv
argvDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 1 time by 1 test
Evaluated by:
  • kill
)
1-6
197 for (; *
*argvDescription
TRUEevaluated 10 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 6 times by 1 test
Evaluated by:
  • kill
argv
*argvDescription
TRUEevaluated 10 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 6 times by 1 test
Evaluated by:
  • kill
; argv++)
6-10
198 {-
199 signum = operand2sig (*argv, signame);-
200 if (signum < 0
signum < 0Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 7 times by 1 test
Evaluated by:
  • kill
)
3-7
201 status =
executed 3 times by 1 test: status = 1 ;
Executed by:
  • kill
3
202 1
executed 3 times by 1 test: status = 1 ;
Executed by:
  • kill
3
203 ;
executed 3 times by 1 test: status = 1 ;
Executed by:
  • kill
3
204 else-
205 {-
206 if (((
((unsigned int...v) - '0' <= 9)Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 3 times by 1 test
Evaluated by:
  • kill
unsigned int) (**argv) - '0' <= 9)
((unsigned int...v) - '0' <= 9)Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 3 times by 1 test
Evaluated by:
  • kill
)
3-4
207 puts (signame);
executed 4 times by 1 test: puts (signame);
Executed by:
  • kill
4
208 else-
209 printf ("%d\n", signum);
executed 3 times by 1 test: printf ("%d\n", signum);
Executed by:
  • kill
3
210 }-
211 }-
212 else-
213 for (signum = 1; signum <= (
signum <= ( 65 - 1)Description
TRUEevaluated 64 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 1 time by 1 test
Evaluated by:
  • kill
1-64
214 65
signum <= ( 65 - 1)Description
TRUEevaluated 64 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 1 time by 1 test
Evaluated by:
  • kill
1-64
215 - 1)
signum <= ( 65 - 1)Description
TRUEevaluated 64 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 1 time by 1 test
Evaluated by:
  • kill
; signum++)
1-64
216 if (sig2str (signum, signame) == 0
sig2str (signum, signame) == 0Description
TRUEevaluated 62 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 2 times by 1 test
Evaluated by:
  • kill
)
2-62
217 puts (signame);
executed 62 times by 1 test: puts (signame);
Executed by:
  • kill
62
218 }
executed 7 times by 1 test: end of block
Executed by:
  • kill
7
219-
220 return
executed 10 times by 1 test: return status;
Executed by:
  • kill
status;
executed 10 times by 1 test: return status;
Executed by:
  • kill
10
221}-
222-
223-
224-
225-
226static int-
227send_signals (int signum, char *const *argv)-
228{-
229 int status = -
230 0-
231 ;-
232 char const *arg = *argv;-
233-
234 do-
235 {-
236 char *endp;-
237 intmax_t n = (-
238 (*__errno_location ()) -
239 = 0, strtoimax (arg, &endp, 10));-
240 pid_t pid = n;-
241-
242 if (-
243 (*
(*__errno_location ()) == 34Description
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • kill
__errno_location ())
(*__errno_location ()) == 34Description
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • kill
0-8
244 ==
(*__errno_location ()) == 34Description
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • kill
0-8
245 34
(*__errno_location ()) == 34Description
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • kill
0-8
246 || pid != n
pid != nDescription
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • kill
|| arg == endp
arg == endpDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • kill
FALSEevaluated 7 times by 1 test
Evaluated by:
  • kill
|| *
*endpDescription
TRUEnever evaluated
FALSEevaluated 7 times by 1 test
Evaluated by:
  • kill
endp
*endpDescription
TRUEnever evaluated
FALSEevaluated 7 times by 1 test
Evaluated by:
  • kill
)
0-8
247 {-
248 error (0, 0, -
249 dcgettext (((void *)0), -
250 "%s: invalid process id"-
251 , 5)-
252 , quote (arg));-
253 status = -
254 1-
255 ;-
256 }
executed 1 time by 1 test: end of block
Executed by:
  • kill
1
257 else if (kill (pid, signum) != 0
kill (pid, signum) != 0Description
TRUEnever evaluated
FALSEevaluated 7 times by 1 test
Evaluated by:
  • kill
)
0-7
258 {-
259 error (0, -
260 (*__errno_location ())-
261 , "%s", quote (arg));-
262 status = -
263 1-
264 ;-
265 }
never executed: end of block
0
266 }
executed 8 times by 1 test: end of block
Executed by:
  • kill
8
267 while ((
(arg = *++argv)Description
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • kill
arg = *++argv)
(arg = *++argv)Description
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • kill
);
0-8
268-
269 return
executed 8 times by 1 test: return status;
Executed by:
  • kill
status;
executed 8 times by 1 test: return status;
Executed by:
  • kill
8
270}-
271-
272int-
273main (int argc, char **argv)-
274{-
275 int optc;-
276 -
277 _Bool -
278 list = -
279 0-
280 ;-
281 -
282 _Bool -
283 table = -
284 0-
285 ;-
286 int signum = -1;-
287 char signame[(sizeof "SIGRTMAX" + (((((sizeof (int) * 8) - (! ((__typeof__ (int)) 0 < (__typeof__ (int)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (int)) 0 < (__typeof__ (int)) -1))) - 1)];-
288-
289 ;-
290 set_program_name (argv[0]);-
291 setlocale (-
292 6-
293 , "");-
294 bindtextdomain ("coreutils", "/usr/local/share/locale");-
295 textdomain ("coreutils");-
296-
297 atexit (close_stdout);-
298-
299 while ((
(optc = getopt... *)0) )) != -1Description
TRUEevaluated 37 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 19 times by 1 test
Evaluated by:
  • kill
optc = getopt_long (argc, argv, short_options, long_options,
(optc = getopt... *)0) )) != -1Description
TRUEevaluated 37 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 19 times by 1 test
Evaluated by:
  • kill
19-37
300 ((void *)0)
(optc = getopt... *)0) )) != -1Description
TRUEevaluated 37 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 19 times by 1 test
Evaluated by:
  • kill
19-37
301 ))
(optc = getopt... *)0) )) != -1Description
TRUEevaluated 37 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 19 times by 1 test
Evaluated by:
  • kill
19-37
302 != -1
(optc = getopt... *)0) )) != -1Description
TRUEevaluated 37 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 19 times by 1 test
Evaluated by:
  • kill
)
19-37
303 switch (optc)-
304 {-
305 case
executed 3 times by 1 test: case '0':
Executed by:
  • kill
'0':
executed 3 times by 1 test: case '0':
Executed by:
  • kill
case
executed 3 times by 1 test: case '1':
Executed by:
  • kill
'1':
executed 3 times by 1 test: case '1':
Executed by:
  • kill
case
never executed: case '2':
'2':
never executed: case '2':
case
never executed: case '3':
'3':
never executed: case '3':
case
never executed: case '4':
'4':
never executed: case '4':
0-3
306 case
never executed: case '5':
'5':
never executed: case '5':
case
never executed: case '6':
'6':
never executed: case '6':
case
never executed: case '7':
'7':
never executed: case '7':
case
never executed: case '8':
'8':
never executed: case '8':
case
never executed: case '9':
'9':
never executed: case '9':
0
307 if (optind != 2
optind != 2Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 3 times by 1 test
Evaluated by:
  • kill
)
3
308 {-
309-
310 optind--;-
311 goto
executed 3 times by 1 test: goto no_more_options;
Executed by:
  • kill
no_more_options;
executed 3 times by 1 test: goto no_more_options;
Executed by:
  • kill
3
312 }-
313 ((void) 0);-
314 case
never executed: case 'A':
code before this statement executed 3 times by 1 test: case 'A':
Executed by:
  • kill
never executed: case 'A':
'A':
code before this statement executed 3 times by 1 test: case 'A':
Executed by:
  • kill
never executed: case 'A':
case
never executed: case 'B':
'B':
never executed: case 'B':
case
executed 2 times by 1 test: case 'C':
Executed by:
  • kill
'C':
executed 2 times by 1 test: case 'C':
Executed by:
  • kill
case
never executed: case 'D':
'D':
never executed: case 'D':
case
never executed: case 'E':
'E':
never executed: case 'E':
0-3
315 case
never executed: case 'F':
'F':
never executed: case 'F':
case
never executed: case 'G':
'G':
never executed: case 'G':
case
never executed: case 'H':
'H':
never executed: case 'H':
case
never executed: case 'I':
'I':
never executed: case 'I':
case
never executed: case 'J':
'J':
never executed: case 'J':
0
316 case
never executed: case 'K':
'K':
never executed: case 'K':
case
never executed: case 'M':
'M':
never executed: case 'M':
case
never executed: case 'N':
'N':
never executed: case 'N':
case
never executed: case 'O':
'O':
never executed: case 'O':
0
317 case
never executed: case 'P':
'P':
never executed: case 'P':
case
never executed: case 'Q':
'Q':
never executed: case 'Q':
case
never executed: case 'R':
'R':
never executed: case 'R':
case
never executed: case 'S':
'S':
never executed: case 'S':
case
executed 1 time by 1 test: case 'T':
Executed by:
  • kill
'T':
executed 1 time by 1 test: case 'T':
Executed by:
  • kill
0-1
318 case
never executed: case 'U':
'U':
never executed: case 'U':
case
never executed: case 'V':
'V':
never executed: case 'V':
case
never executed: case 'W':
'W':
never executed: case 'W':
case
never executed: case 'X':
'X':
never executed: case 'X':
case
never executed: case 'Y':
'Y':
never executed: case 'Y':
0
319 case
never executed: case 'Z':
'Z':
never executed: case 'Z':
0
320 if (! optarg
! optargDescription
TRUEevaluated 3 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 3 times by 1 test
Evaluated by:
  • kill
)
3
321 optarg = argv[optind - 1] + strlen (argv[optind - 1]);
executed 3 times by 1 test: optarg = argv[optind - 1] + strlen (argv[optind - 1]);
Executed by:
  • kill
3
322 if (optarg != argv[optind - 1] + 2
optarg != argv[optind - 1] + 2Description
TRUEnever evaluated
FALSEevaluated 6 times by 1 test
Evaluated by:
  • kill
)
0-6
323 {-
324 error (0, 0, -
325 dcgettext (((void *)0), -
326 "invalid option -- %c"-
327 , 5)-
328 , optc);-
329 usage (-
330 1-
331 );-
332 }
never executed: end of block
0
333 optarg--;-
334 ((void) 0);-
335 case
executed 1 time by 1 test: case 'n':
Executed by:
  • kill
'n':
executed 1 time by 1 test: case 'n':
Executed by:
  • kill
code before this statement executed 6 times by 1 test: case 'n':
Executed by:
  • kill
1-6
336 case
executed 3 times by 1 test: case 's':
Executed by:
  • kill
's':
executed 3 times by 1 test: case 's':
Executed by:
  • kill
3
337 if (0 <= signum
0 <= signumDescription
TRUEnever evaluated
FALSEevaluated 10 times by 1 test
Evaluated by:
  • kill
)
0-10
338 {-
339 error (0, 0, -
340 dcgettext (((void *)0), -
341 "%s: multiple signals specified"-
342 , 5)-
343 , quote (optarg));-
344 usage (-
345 1-
346 );-
347 }
never executed: end of block
0
348 signum = operand2sig (optarg, signame);-
349 if (signum < 0
signum < 0Description
TRUEnever evaluated
FALSEevaluated 10 times by 1 test
Evaluated by:
  • kill
)
0-10
350 usage (
never executed: usage ( 1 );
0
351 1
never executed: usage ( 1 );
0
352 );
never executed: usage ( 1 );
0
353 break;
executed 10 times by 1 test: break;
Executed by:
  • kill
10
354-
355 case
executed 1 time by 1 test: case 'L':
Executed by:
  • kill
'L':
executed 1 time by 1 test: case 'L':
Executed by:
  • kill
1
356 case
executed 4 times by 1 test: case 't':
Executed by:
  • kill
't':
executed 4 times by 1 test: case 't':
Executed by:
  • kill
4
357 table = -
358 1-
359 ;-
360 ((void) 0);-
361 case
executed 11 times by 1 test: case 'l':
Executed by:
  • kill
'l':
executed 11 times by 1 test: case 'l':
Executed by:
  • kill
code before this statement executed 5 times by 1 test: case 'l':
Executed by:
  • kill
5-11
362 if (list
listDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 14 times by 1 test
Evaluated by:
  • kill
)
2-14
363 {-
364 error (0, 0, -
365 dcgettext (((void *)0), -
366 "multiple -l or -t options specified"-
367 , 5)-
368 );-
369 usage (-
370 1-
371 );-
372 }
never executed: end of block
0
373 list = -
374 1-
375 ;-
376 break;
executed 14 times by 1 test: break;
Executed by:
  • kill
14
377-
378 case
executed 2 times by 1 test: case GETOPT_HELP_CHAR:
Executed by:
  • kill
GETOPT_HELP_CHAR:
executed 2 times by 1 test: case GETOPT_HELP_CHAR:
Executed by:
  • kill
usage (
2
379 0-
380 ); break;
never executed: break;
;
0
381 case
executed 4 times by 1 test: case GETOPT_VERSION_CHAR:
Executed by:
  • kill
GETOPT_VERSION_CHAR:
executed 4 times by 1 test: case GETOPT_VERSION_CHAR:
Executed by:
  • kill
version_etc (
4
382 stdout-
383 , "kill", "GNU coreutils", Version, ("Paul Eggert"), (char *) -
384 ((void *)0)-
385 ); exit (
executed 4 times by 1 test: exit ( 0 );
Executed by:
  • kill
4
386 0
executed 4 times by 1 test: exit ( 0 );
Executed by:
  • kill
4
387 );
executed 4 times by 1 test: exit ( 0 );
Executed by:
  • kill
break;
never executed: break;
;
0-4
388 default
executed 2 times by 1 test: default:
Executed by:
  • kill
:
executed 2 times by 1 test: default:
Executed by:
  • kill
2
389 usage (-
390 1-
391 );-
392 }
never executed: end of block
0
393 no_more_options:
code before this statement executed 19 times by 1 test: no_more_options:
Executed by:
  • kill
19
394-
395 if (signum < 0
signum < 0Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 10 times by 1 test
Evaluated by:
  • kill
)
10-12
396 signum =
executed 12 times by 1 test: signum = 15 ;
Executed by:
  • kill
12
397 15
executed 12 times by 1 test: signum = 15 ;
Executed by:
  • kill
12
398 ;
executed 12 times by 1 test: signum = 15 ;
Executed by:
  • kill
12
399 else if (list
listDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 8 times by 1 test
Evaluated by:
  • kill
)
2-8
400 {-
401 error (0, 0, -
402 dcgettext (((void *)0), -
403 "cannot combine signal with -l or -t"-
404 , 5)-
405 );-
406 usage (-
407 1-
408 );-
409 }
never executed: end of block
0
410-
411 if ( ! list
! listDescription
TRUEevaluated 10 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 10 times by 1 test
Evaluated by:
  • kill
&& argc <= optind
argc <= optindDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • kill
FALSEevaluated 8 times by 1 test
Evaluated by:
  • kill
)
2-10
412 {-
413 error (0, 0, -
414 dcgettext (((void *)0), -
415 "no process ID specified"-
416 , 5)-
417 );-
418 usage (-
419 1-
420 );-
421 }
never executed: end of block
0
422-
423 return
executed 18 times by 1 test: return (list ? list_signals (table, optind < argc ? argv + optind : ((void *)0) ) : send_signals (signum, argv + optind));
Executed by:
  • kill
(list
executed 18 times by 1 test: return (list ? list_signals (table, optind < argc ? argv + optind : ((void *)0) ) : send_signals (signum, argv + optind));
Executed by:
  • kill
18
424 ? list_signals (table, optind < argc ? argv + optind :
executed 18 times by 1 test: return (list ? list_signals (table, optind < argc ? argv + optind : ((void *)0) ) : send_signals (signum, argv + optind));
Executed by:
  • kill
18
425 ((void *)0)
executed 18 times by 1 test: return (list ? list_signals (table, optind < argc ? argv + optind : ((void *)0) ) : send_signals (signum, argv + optind));
Executed by:
  • kill
18
426 )
executed 18 times by 1 test: return (list ? list_signals (table, optind < argc ? argv + optind : ((void *)0) ) : send_signals (signum, argv + optind));
Executed by:
  • kill
18
427 : send_signals (signum, argv + optind));
executed 18 times by 1 test: return (list ? list_signals (table, optind < argc ? argv + optind : ((void *)0) ) : send_signals (signum, argv + optind));
Executed by:
  • kill
18
428}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.1.2