Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/bash/src/execute_cmd.c |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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 | extern int command_string_index; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
37 | extern char *the_printed_command; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
38 | extern time_t shell_start_time; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
39 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
40 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
41 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
42 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
43 | extern int close (int); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
44 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
45 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
46 | static void close_pipes (int, int); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
47 | static void do_piping (int, int); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
48 | static void bind_lastarg (char *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
49 | static int shell_control_structure (enum command_type); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
50 | static void cleanup_redirects (REDIRECT *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
51 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
52 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
53 | static int restore_signal_mask (sigset_t *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
54 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
55 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
56 | static void async_redirect_stdin (void); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
57 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
58 | static int builtin_status (int); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
59 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
60 | static int execute_for_command (FOR_COM *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
61 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
62 | static int displen (const char *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
63 | static int print_index_and_element (int, int, WORD_LIST *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
64 | static void indent (int, int); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
65 | static void print_select_list (WORD_LIST *, int, int, int); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
66 | static char *select_query (WORD_LIST *, int, char *, int); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
67 | static int execute_select_command (SELECT_COM *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
68 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
69 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
70 | static int execute_arith_command (ARITH_COM *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
71 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
72 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
73 | static int execute_cond_node (COND_COM *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
74 | static int execute_cond_command (COND_COM *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
75 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
76 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
77 | static int mkfmt (char *, int, int, time_t, int); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
78 | static void print_formatted_time (FILE *, char *, time_t, int, time_t, int, time_t, int, int) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
79 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
80 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
81 | static int time_command (COMMAND *, int, int, int, struct fd_bitmap *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
82 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
83 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
84 | static intmax_t eval_arith_for_expr (WORD_LIST *, int *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
85 | static int execute_arith_for_command (ARITH_FOR_COM *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
86 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
87 | static int execute_case_command (CASE_COM *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
88 | static int execute_while_command (WHILE_COM *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
89 | static int execute_until_command (WHILE_COM *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
90 | static int execute_while_or_until (WHILE_COM *, int); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
91 | static int execute_if_command (IF_COM *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
92 | static int execute_null_command (REDIRECT *, int, int, int); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
93 | static void fix_assignment_words (WORD_LIST *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
94 | static int execute_simple_command (SIMPLE_COM *, int, int, int, struct fd_bitmap *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
95 | static int execute_builtin (sh_builtin_func_t *, WORD_LIST *, int, int); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
96 | static int execute_function (SHELL_VAR *, WORD_LIST *, int, struct fd_bitmap *, int, int); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
97 | static int execute_builtin_or_function (WORD_LIST *, sh_builtin_func_t *, SHELL_VAR *, REDIRECT *, struct fd_bitmap *, int) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
98 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
99 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
100 | static void execute_subshell_builtin_or_function (WORD_LIST *, REDIRECT *, sh_builtin_func_t *, SHELL_VAR *, int, int, int, struct fd_bitmap *, int) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
101 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
102 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
103 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
104 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
105 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
106 | static int execute_disk_command (WORD_LIST *, REDIRECT *, char *, int, int, int, struct fd_bitmap *, int) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
107 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
108 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
109 | static char *getinterp (char *, int, int *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
110 | static void initialize_subshell (void); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
111 | static int execute_in_subshell (COMMAND *, int, int, int, struct fd_bitmap *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
112 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
113 | static void coproc_setstatus (struct coproc *, int); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
114 | static int execute_coproc (COMMAND *, int, int, struct fd_bitmap *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
115 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
116 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
117 | static int execute_pipeline (COMMAND *, int, int, int, struct fd_bitmap *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
118 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
119 | static int execute_connection (COMMAND *, int, int, int, struct fd_bitmap *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
120 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
121 | static int execute_intern_function (WORD_DESC *, FUNCTION_DEF *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
122 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
123 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
124 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
125 | int stdin_redir; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
126 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
127 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
128 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
129 | char *this_command_name; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
130 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
131 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
132 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
133 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
134 | char *the_printed_command_except_trap; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
135 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
136 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
137 | int return_catch_flag; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
138 | int return_catch_value; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
139 | sigjmp_buf return_catch; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
140 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
141 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
142 | volatile int last_command_exit_value; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
143 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
144 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
145 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
146 | int last_command_exit_signal; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
147 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
148 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
149 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
150 | int builtin_ignoring_errexit = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
151 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
152 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
153 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
154 | REDIRECT *redirection_undo_list = (REDIRECT *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
155 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
156 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
157 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
158 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
159 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
160 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
161 | REDIRECT *exec_redirection_undo_list = (REDIRECT *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
162 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
163 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
164 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
165 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
166 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
167 | int executing_builtin = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
168 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
169 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
170 | int executing_list = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
171 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
172 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
173 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
174 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
175 | int comsub_ignore_return = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
176 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
177 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
178 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
179 | int subshell_environment; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
180 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
181 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
182 | int subshell_level = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
183 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
184 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
185 | SHELL_VAR *this_shell_function; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
186 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
187 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
188 | int match_ignore_case = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
189 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
190 | int executing_command_builtin = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
191 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
192 | struct stat SB; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
193 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
194 | static int special_builtin_failed; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
195 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
196 | static COMMAND *currently_executing_command; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
197 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
198 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
199 | static int function_line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
200 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
201 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
202 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
203 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
204 | static int showing_function_line; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
205 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
206 | static int connection_count; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
207 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
208 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
209 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
210 | int line_number_for_err_trap; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
211 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
212 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
213 | int funcnest = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
214 | int funcnest_max = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
215 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
216 | int evalnest = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
217 | int evalnest_max = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
218 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
219 | int sourcenest = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
220 | int sourcenest_max = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
221 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
222 | volatile int from_return_trap = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
223 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
224 | int lastpipe_opt = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
225 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
226 | struct fd_bitmap *current_fds_to_close = (struct fd_bitmap *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
227 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
228 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
229 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
230 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
231 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
232 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
233 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
234 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
235 | struct fd_bitmap * | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
236 | new_fd_bitmap (size) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
237 | int size; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
238 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
239 | struct fd_bitmap *ret; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
240 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
241 | ret = (struct fd_bitmap *)sh_xmalloc((sizeof (struct fd_bitmap)), "execute_cmd.c", 308); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
242 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
243 | ret->size = size; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
244 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
245 | if (size
| 0-122425482 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
246 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
247 | ret->bitmap = (char *)sh_xmalloc((size), "execute_cmd.c", 314); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
248 | memset (ret->bitmap, '\0', size); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
249 | } executed 122425482 times by 1 test: end of block Executed by:
| 122425482 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
250 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
251 | ret->bitmap = (char *) never executed: ret->bitmap = (char *) ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
252 | ((void *)0) never executed: ret->bitmap = (char *) ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
253 | ; never executed: ret->bitmap = (char *) ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
254 | return executed 122425482 times by 1 test: (ret);return (ret); Executed by:
executed 122425482 times by 1 test: return (ret); Executed by:
| 122425482 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
255 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
256 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
257 | void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
258 | dispose_fd_bitmap (fdbp) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
259 | struct fd_bitmap *fdbp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
260 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
261 | do { if (fdbp->bitmap
executed 122385484 times by 1 test: } while (0);sh_xfree((fdbp->bitmap), "execute_cmd.c", 326); Executed by:
| 0-122385484 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
262 | sh_xfree((fdbp), "execute_cmd.c", 327); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
263 | } executed 122385484 times by 1 test: end of block Executed by:
| 122385484 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
264 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
265 | void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
266 | close_fd_bitmap (fdbp) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
267 | struct fd_bitmap *fdbp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
268 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
269 | register int i; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
270 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
271 | if (fdbp
| 0-3446 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
272 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
273 | for (i = 0; i < fdbp->size
| 3446-110272 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
274 | if (fdbp->bitmap[i]
| 1026-109246 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
275 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
276 | close (i); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
277 | fdbp->bitmap[i] = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
278 | } executed 1026 times by 1 test: end of block Executed by:
| 1026 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
279 | } executed 3446 times by 1 test: end of block Executed by:
| 3446 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
280 | } executed 3446 times by 1 test: end of block Executed by:
| 3446 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
281 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
282 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
283 | int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
284 | executing_line_number () | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
285 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
286 | if (executing
| 376-1645807 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
287 | (variable_context == 0
| 0-1642348 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
288 | currently_executing_command
| 484-1644947 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
289 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
290 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
291 | if (currently_executing_command->type == cm_cond
| 1-1644946 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
292 | return executed 1 time by 1 test: currently_executing_command->value.Cond->line;return currently_executing_command->value.Cond->line; Executed by:
executed 1 time by 1 test: return currently_executing_command->value.Cond->line; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
293 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
294 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
295 | if (currently_executing_command->type == cm_arith
| 18-1644928 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
296 | return executed 18 times by 1 test: currently_executing_command->value.Arith->line;return currently_executing_command->value.Arith->line; Executed by:
executed 18 times by 1 test: return currently_executing_command->value.Arith->line; Executed by:
| 18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
297 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
298 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
299 | if (currently_executing_command->type == cm_arith_for
| 0-1644928 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
300 | return never executed: currently_executing_command->value.ArithFor->line;return currently_executing_command->value.ArithFor->line; never executed: return currently_executing_command->value.ArithFor->line; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
301 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
302 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
303 | return executed 1644928 times by 1 test: line_number;return line_number; Executed by:
executed 1644928 times by 1 test: return line_number; Executed by:
| 1644928 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
304 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
305 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
306 | return executed 6294 times by 1 test: line_number;return line_number; Executed by:
executed 6294 times by 1 test: return line_number; Executed by:
| 6294 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
307 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
308 | int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
309 | execute_command (command) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
310 | COMMAND *command; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
311 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
312 | struct fd_bitmap *bitmap; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
313 | int result; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
314 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
315 | current_fds_to_close = (struct fd_bitmap *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
316 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
317 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
318 | bitmap = new_fd_bitmap (32); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
319 | begin_unwind_frame ("execute-command"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
320 | add_unwind_protect (dispose_fd_bitmap, (char *)bitmap); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
321 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
322 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
323 | result = execute_command_internal (command, 0, -1, -1, bitmap); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
324 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
325 | dispose_fd_bitmap (bitmap); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
326 | discard_unwind_frame ("execute-command"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
327 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
328 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
329 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
330 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
331 | if (variable_context == 0
| 151946-113709561 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
332 | unlink_fifo_list (); executed 151946 times by 1 test: unlink_fifo_list (); Executed by:
| 151946 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
333 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
334 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
335 | do { if (terminating_signal
never executed: if (interrupt_statetermsig_handler (terminating_signal);
never executed: } while (0);throw_to_top_level (); | 0-122350373 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
336 | return executed 122350373 times by 1 test: (result);return (result); Executed by:
executed 122350373 times by 1 test: return (result); Executed by:
| 122350373 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
337 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
338 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
339 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
340 | static int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
341 | shell_control_structure (type) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
342 | enum command_type type; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
343 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
344 | switch (type) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
345 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
346 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
347 | case executed 5223 times by 1 test: cm_arith_for:case cm_arith_for: Executed by:
executed 5223 times by 1 test: case cm_arith_for: Executed by:
| 5223 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
348 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
349 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
350 | case executed 18 times by 1 test: cm_select:case cm_select: Executed by:
executed 18 times by 1 test: case cm_select: Executed by:
| 18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
351 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
352 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
353 | case executed 12952036 times by 1 test: cm_arith:case cm_arith: Executed by:
executed 12952036 times by 1 test: case cm_arith: Executed by:
| 12952036 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
354 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
355 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
356 | case executed 1260 times by 1 test: cm_cond:case cm_cond: Executed by:
executed 1260 times by 1 test: case cm_cond: Executed by:
| 1260 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
357 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
358 | case executed 73894342 times by 1 test: cm_case:case cm_case: Executed by:
executed 73894342 times by 1 test: case cm_case: Executed by:
| 73894342 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
359 | case executed 7785223 times by 1 test: cm_while:case cm_while: Executed by:
executed 7785223 times by 1 test: case cm_while: Executed by:
| 7785223 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
360 | case executed 24 times by 1 test: cm_until:case cm_until: Executed by:
executed 24 times by 1 test: case cm_until: Executed by:
| 24 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
361 | case executed 16483 times by 1 test: cm_if:case cm_if: Executed by:
executed 16483 times by 1 test: case cm_if: Executed by:
| 16483 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
362 | case executed 4028953 times by 1 test: cm_for:case cm_for: Executed by:
executed 4028953 times by 1 test: case cm_for: Executed by:
| 4028953 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
363 | case executed 3281807 times by 1 test: cm_group:case cm_group: Executed by:
executed 3281807 times by 1 test: case cm_group: Executed by:
| 3281807 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
364 | case executed 22320 times by 1 test: cm_function_def:case cm_function_def: Executed by:
executed 22320 times by 1 test: case cm_function_def: Executed by:
| 22320 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
365 | return executed 101987689 times by 1 test: (1);return (1); Executed by:
executed 101987689 times by 1 test: return (1); Executed by:
| 101987689 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
366 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
367 | default executed 253660192 times by 1 test: :default: Executed by:
executed 253660192 times by 1 test: default: Executed by:
| 253660192 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
368 | return executed 253660192 times by 1 test: (0);return (0); Executed by:
executed 253660192 times by 1 test: return (0); Executed by:
| 253660192 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
369 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
370 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
371 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
372 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
373 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
374 | static void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
375 | cleanup_redirects (list) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
376 | REDIRECT *list; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
377 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
378 | do_redirections (list, 0x01); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
379 | dispose_redirects (list); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
380 | } executed 30627293 times by 1 test: end of block Executed by:
| 30627293 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
381 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
382 | void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
383 | undo_partial_redirects () | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
384 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
385 | if (redirection_undo_list
| 5597-34681550 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
386 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
387 | cleanup_redirects (redirection_undo_list); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
388 | redirection_undo_list = (REDIRECT *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
389 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
390 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
391 | } executed 5597 times by 1 test: end of block Executed by:
| 5597 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
392 | } executed 34687147 times by 1 test: end of block Executed by:
| 34687147 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
393 | void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
394 | dispose_exec_redirects () | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
395 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
396 | if (exec_redirection_undo_list
| 31689-34687854 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
397 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
398 | dispose_redirects (exec_redirection_undo_list); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
399 | exec_redirection_undo_list = (REDIRECT *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
400 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
401 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
402 | } executed 31689 times by 1 test: end of block Executed by:
| 31689 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
403 | } executed 34719543 times by 1 test: end of block Executed by:
| 34719543 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
404 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
405 | void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
406 | dispose_partial_redirects () | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
407 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
408 | if (redirection_undo_list
| 0-660672 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
409 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
410 | dispose_redirects (redirection_undo_list); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
411 | redirection_undo_list = (REDIRECT *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
412 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
413 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
414 | } executed 660672 times by 1 test: end of block Executed by:
| 660672 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
415 | } executed 660672 times by 1 test: end of block Executed by:
| 660672 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
416 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
417 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
418 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
419 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
420 | static int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
421 | restore_signal_mask (set) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
422 | sigset_t *set; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
423 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
424 | return executed 1 time by 1 test: (sigprocmask (return (sigprocmask ( 2 , set, (sigset_t *) ((void *)0) )); Executed by:
executed 1 time by 1 test: return (sigprocmask ( 2 , set, (sigset_t *) ((void *)0) )); Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
425 | 2 executed 1 time by 1 test: return (sigprocmask ( 2 , set, (sigset_t *) ((void *)0) )); Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
426 | , set, (sigset_t *) executed 1 time by 1 test: return (sigprocmask ( 2 , set, (sigset_t *) ((void *)0) )); Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
427 | ((void *)0) executed 1 time by 1 test: return (sigprocmask ( 2 , set, (sigset_t *) ((void *)0) )); Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
428 | )); executed 1 time by 1 test: return (sigprocmask ( 2 , set, (sigset_t *) ((void *)0) )); Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
429 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
430 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
431 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
432 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
433 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
434 | void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
435 | open_files () | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
436 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
437 | register int i; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
438 | int f, fd_table_size; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
439 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
440 | fd_table_size = getdtablesize (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
441 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
442 | fprintf ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
443 | stderr | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
444 | , "pid %ld open files:", (long)getpid ()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
445 | for (i = 3; i < fd_table_size
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
446 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
447 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
448 | 1
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
449 | , 0)) != -1
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
450 | fprintf ( never executed: fprintf ( stderr , " %d (%s)", i, f ? "close" : "open"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
451 | stderr never executed: fprintf ( stderr , " %d (%s)", i, f ? "close" : "open"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
452 | , " %d (%s)", i, f ? "close" : "open"); never executed: fprintf ( stderr , " %d (%s)", i, f ? "close" : "open"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
453 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
454 | fprintf ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
455 | stderr | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
456 | , "\n"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
457 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
458 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
459 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
460 | static void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
461 | async_redirect_stdin () | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
462 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
463 | int fd; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
464 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
465 | fd = open ("/dev/null", | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
466 | 00 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
467 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
468 | if (fd > 0
| 0-8 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
469 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
470 | dup2 (fd, 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
471 | close (fd); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
472 | } executed 8 times by 1 test: end of block Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
473 | else if (fd < 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
474 | internal_error ( never executed: internal_error ( dcgettext (((void *)0), "cannot redirect standard input from /dev/null: %s" , 5) , strerror ( (*__errno_location ()) )); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
475 | dcgettext (((void *)0), never executed: internal_error ( dcgettext (((void *)0), "cannot redirect standard input from /dev/null: %s" , 5) , strerror ( (*__errno_location ()) )); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
476 | "cannot redirect standard input from /dev/null: %s" never executed: internal_error ( dcgettext (((void *)0), "cannot redirect standard input from /dev/null: %s" , 5) , strerror ( (*__errno_location ()) )); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
477 | , 5) never executed: internal_error ( dcgettext (((void *)0), "cannot redirect standard input from /dev/null: %s" , 5) , strerror ( (*__errno_location ()) )); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
478 | , strerror ( never executed: internal_error ( dcgettext (((void *)0), "cannot redirect standard input from /dev/null: %s" , 5) , strerror ( (*__errno_location ()) )); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
479 | (*__errno_location ()) never executed: internal_error ( dcgettext (((void *)0), "cannot redirect standard input from /dev/null: %s" , 5) , strerror ( (*__errno_location ()) )); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
480 | )); never executed: internal_error ( dcgettext (((void *)0), "cannot redirect standard input from /dev/null: %s" , 5) , strerror ( (*__errno_location ()) )); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
481 | } executed 8 times by 1 test: end of block Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
482 | int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
483 | execute_command_internal (command, asynchronous, pipe_in, pipe_out, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
484 | fds_to_close) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
485 | COMMAND *command; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
486 | int asynchronous; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
487 | int pipe_in, pipe_out; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
488 | struct fd_bitmap *fds_to_close; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
489 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
490 | int exec_result, user_subshell, invert, ignore_return, was_error_trap; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
491 | REDIRECT *my_undo_list, *exec_undo_list; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
492 | char *tcmd; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
493 | volatile int save_line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
494 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
495 | volatile int ofifo, nfifo, osize, saved_fifo; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
496 | volatile char *ofifo_list; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
497 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
498 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
499 | if (breaking
| 140874-181348925 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
500 | return executed 6600500 times by 1 test: (last_command_exit_value);return (last_command_exit_value); Executed by:
executed 6600500 times by 1 test: return (last_command_exit_value); Executed by:
| 6600500 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
501 | if (command == 0
| 0-177829444 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
502 | return executed 3378607 times by 1 test: (0);return (0); Executed by:
executed 3378607 times by 1 test: return (0); Executed by:
| 3378607 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
503 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
504 | do { if (terminating_signal
never executed: if (interrupt_statetermsig_handler (terminating_signal);
never executed: } while (0);throw_to_top_level (); | 0-177829444 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
505 | run_pending_traps (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
506 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
507 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
508 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
509 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
510 | currently_executing_command = command; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
511 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
512 | invert = (command->flags & 0x04) != 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
513 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
514 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
515 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
516 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
517 | if (exit_immediately_on_error
| 57-177738683 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
518 | command->flags |= 0x08; executed 57 times by 1 test: command->flags |= 0x08; Executed by:
| 57 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
519 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
520 | exec_result = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
521 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
522 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
523 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
524 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
525 | if (command->type == cm_subshell
| 2-177824315 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
526 | return executed 2 times by 1 test: (execute_in_subshell (command, asynchronous, pipe_in, pipe_out, fds_to_close));return (execute_in_subshell (command, asynchronous, pipe_in, pipe_out, fds_to_close)); Executed by:
executed 2 times by 1 test: return (execute_in_subshell (command, asynchronous, pipe_in, pipe_out, fds_to_close)); Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
527 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
528 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
529 | if (command->type == cm_coproc
| 34-177829408 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
530 | return executed 34 times by 1 test: (last_command_exit_value = execute_coproc (command, pipe_in, pipe_out, fds_to_close));return (last_command_exit_value = execute_coproc (command, pipe_in, pipe_out, fds_to_close)); Executed by:
executed 34 times by 1 test: return (last_command_exit_value = execute_coproc (command, pipe_in, pipe_out, fds_to_close)); Executed by:
| 34 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
531 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
532 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
533 | user_subshell = command->type == cm_subshell
| 0-177824281 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
534 | if (command->type == cm_subshell
| 5127-177824281 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
535 | (
| 0-177824281 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
536 | (shell_control_structure (command->type)
| 50994182-126830099 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
537 | (pipe_out != -1
| 51-50993709 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
538 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
539 | pid_t paren_pid; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
540 | int s; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
541 | char *p; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
542 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
543 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
544 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
545 | line_number_for_err_trap = line_number = command->value.Subshell->line; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
546 | tcmd = make_command_string (command); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
547 | paren_pid = make_child (p = (char *)strcpy (sh_xmalloc((1 + strlen (tcmd)), "execute_cmd.c", 629), (tcmd)), asynchronous); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
548 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
549 | if (user_subshell
| 0-5127 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
550 | 65
| 0-5127 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
551 | +1)
| 0-5127 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
552 | signal_in_progress (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
553 | 65
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
554 | ) == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
555 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
556 | do { if (the_printed_command_except_trap
never executed: } while (0);sh_xfree((the_printed_command_except_trap), "execute_cmd.c", 634); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
557 | the_printed_command_except_trap = (char *)strcpy (sh_xmalloc((1 + strlen (the_printed_command)), "execute_cmd.c", 635), (the_printed_command)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
558 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
559 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
560 | if (paren_pid == 0
| 1112-4744 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
561 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
562 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
563 | do { if (p
executed 1112 times by 1 test: } while (0);sh_xfree((p), "execute_cmd.c", 641); Executed by:
| 0-1112 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
564 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
565 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
566 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
567 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
568 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
569 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
570 | s = user_subshell == 0
| 0-1058 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
571 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
572 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
573 | s += user_subshell == 0
| 0-1058 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
574 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
575 | last_command_exit_value = execute_in_subshell (command, asynchronous, pipe_in, pipe_out, fds_to_close); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
576 | if (s
| 46-936 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
577 | subshell_exit (last_command_exit_value); executed 46 times by 1 test: subshell_exit (last_command_exit_value); Executed by:
| 46 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
578 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
579 | sh_exit (last_command_exit_value); executed 936 times by 1 test: sh_exit (last_command_exit_value); Executed by:
| 936 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
580 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
581 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
582 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
583 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
584 | close_pipes (pipe_in, pipe_out); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
585 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
586 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
587 | if (variable_context == 0
| 1905-2839 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
588 | unlink_fifo_list (); executed 2839 times by 1 test: unlink_fifo_list (); Executed by:
| 2839 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
589 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
590 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
591 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
592 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
593 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
594 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
595 | if (pipe_out != -1
| 535-4209 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
596 | return executed 535 times by 1 test: (0);return (0); Executed by:
executed 535 times by 1 test: return (0); Executed by:
| 535 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
597 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
598 | stop_pipeline (asynchronous, (COMMAND *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
599 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
600 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
601 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
602 | if (asynchronous == 0
| 46-4163 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
603 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
604 | was_error_trap = signal_is_trapped (
| 0-4163 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
605 | 65
| 0-4163 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
606 | +1)
| 0-4163 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
607 | 65
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
608 | +1) == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
609 | invert = (command->flags & 0x04) != 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
610 | ignore_return = (command->flags & 0x08) != 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
611 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
612 | exec_result = wait_for (paren_pid); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
613 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
614 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
615 | if (invert
| 52-4111 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
616 | exec_result = ((
executed 52 times by 1 test: exec_result = ((exec_result == 0) ? 1 : 0); Executed by:
| 26-52 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
617 | ? 1 executed 52 times by 1 test: exec_result = ((exec_result == 0) ? 1 : 0); Executed by:
| 52 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
618 | : 0); executed 52 times by 1 test: exec_result = ((exec_result == 0) ? 1 : 0); Executed by:
| 52 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
619 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
620 | last_command_exit_value = exec_result; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
621 | if (user_subshell
| 0-3989 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
622 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
623 | save_line_number = line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
624 | line_number = line_number_for_err_trap; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
625 | run_error_trap (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
626 | line_number = save_line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
627 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
628 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
629 | if (user_subshell
| 0-3989 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
630 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
631 | run_pending_traps (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
632 | jump_to_top_level (4); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
633 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
634 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
635 | return executed 4150 times by 1 test: (last_command_exit_value);return (last_command_exit_value); Executed by:
executed 4150 times by 1 test: return (last_command_exit_value); Executed by:
| 4150 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
636 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
637 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
638 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
639 | do { if (interactive
never executed: } while (0);describe_pid (paren_pid); | 0-46 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
640 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
641 | run_pending_traps (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
642 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
643 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
644 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
645 | last_command_exit_value = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
646 | return executed 46 times by 1 test: (0);return (0); Executed by:
executed 46 times by 1 test: return (0); Executed by:
| 46 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
647 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
648 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
649 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
650 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
651 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
652 | if (command->flags & 0x80
| 6-177823546 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
653 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
654 | if (asynchronous
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
655 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
656 | command->flags |= 0x02; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
657 | exec_result = execute_command_internal (command, 1, pipe_in, pipe_out, fds_to_close); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
658 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
659 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
660 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
661 | exec_result = time_command (command, asynchronous, pipe_in, pipe_out, fds_to_close); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
662 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
663 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
664 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
665 | currently_executing_command = (COMMAND *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
666 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
667 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
668 | } executed 6 times by 1 test: end of block Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
669 | return executed 6 times by 1 test: (exec_result);return (exec_result); Executed by:
executed 6 times by 1 test: return (exec_result); Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
670 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
671 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
672 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
673 | if (shell_control_structure (command->type)
| 662026-126830093 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
674 | stdin_redir = stdin_redirects (command->redirects); executed 662026 times by 1 test: stdin_redir = stdin_redirects (command->redirects); Executed by:
| 662026 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
675 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
676 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
677 | if (variable_context != 0
| 12845848-164977698 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
678 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
679 | ofifo = num_fifos (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
680 | ofifo_list = copy_fifo_list ((int *)&osize); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
681 | begin_unwind_frame ("internal_fifos"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
682 | add_unwind_protect (xfree, ofifo_list); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
683 | saved_fifo = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
684 | } executed 164977698 times by 1 test: end of block Executed by:
| 164977698 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
685 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
686 | saved_fifo = 0; executed 12845848 times by 1 test: saved_fifo = 0; Executed by:
| 12845848 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
687 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
688 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
689 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
690 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
691 | if (do_redirections (command->redirects, 0x01|0x02) != 0
| 0-177822193 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
692 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
693 | undo_partial_redirects (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
694 | dispose_exec_redirects (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
695 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
696 | if (saved_fifo
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
697 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
698 | sh_xfree(((void *)ofifo_list), "execute_cmd.c", 768); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
699 | discard_unwind_frame ("internal_fifos"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
700 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
701 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
702 | return never executed: (last_command_exit_value = 1);return (last_command_exit_value = 1); never executed: return (last_command_exit_value = 1); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
703 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
704 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
705 | if (redirection_undo_list
| 660672-177161521 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
706 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
707 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
708 | my_undo_list = (REDIRECT *)copy_redirects (redirection_undo_list); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
709 | dispose_partial_redirects (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
710 | } executed 660672 times by 1 test: end of block Executed by:
| 660672 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
711 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
712 | my_undo_list = (REDIRECT *) executed 177161521 times by 1 test: my_undo_list = (REDIRECT *) ((void *)0) ; Executed by:
| 177161521 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
713 | ((void *)0) executed 177161521 times by 1 test: my_undo_list = (REDIRECT *) ((void *)0) ; Executed by:
| 177161521 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
714 | ; executed 177161521 times by 1 test: my_undo_list = (REDIRECT *) ((void *)0) ; Executed by:
| 177161521 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
715 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
716 | if (exec_redirection_undo_list
| 26173-177796020 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
717 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
718 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
719 | exec_undo_list = (REDIRECT *)copy_redirects (exec_redirection_undo_list); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
720 | dispose_exec_redirects (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
721 | } executed 26173 times by 1 test: end of block Executed by:
| 26173 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
722 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
723 | exec_undo_list = (REDIRECT *) executed 177796020 times by 1 test: exec_undo_list = (REDIRECT *) ((void *)0) ; Executed by:
| 177796020 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
724 | ((void *)0) executed 177796020 times by 1 test: exec_undo_list = (REDIRECT *) ((void *)0) ; Executed by:
| 177796020 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
725 | ; executed 177796020 times by 1 test: exec_undo_list = (REDIRECT *) ((void *)0) ; Executed by:
| 177796020 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
726 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
727 | if (my_undo_list
| 0-177161521 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
728 | begin_unwind_frame ("loop_redirections"); executed 660672 times by 1 test: begin_unwind_frame ("loop_redirections"); Executed by:
| 660672 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
729 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
730 | if (my_undo_list
| 660672-177161521 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
731 | add_unwind_protect ((Function *)cleanup_redirects, my_undo_list); executed 660672 times by 1 test: add_unwind_protect ((Function *)cleanup_redirects, my_undo_list); Executed by:
| 660672 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
732 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
733 | if (exec_undo_list
| 26173-177796020 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
734 | add_unwind_protect ((Function *)dispose_redirects, exec_undo_list); executed 26173 times by 1 test: add_unwind_protect ((Function *)dispose_redirects, exec_undo_list); Executed by:
| 26173 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
735 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
736 | ignore_return = (command->flags & 0x08) != 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
737 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
738 | do { if (terminating_signal
never executed: if (interrupt_statetermsig_handler (terminating_signal);
never executed: } while (0);throw_to_top_level (); | 0-177822193 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
739 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
740 | switch (command->type) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
741 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
742 | case executed 64710245 times by 1 test: cm_simple:case cm_simple: Executed by:
executed 64710245 times by 1 test: case cm_simple: Executed by:
| 64710245 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
743 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
744 | save_line_number = line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
745 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
746 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
747 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
748 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
749 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
750 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
751 | was_error_trap = signal_is_trapped (
| 62-64710183 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
752 | 65
| 62-64710183 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
753 | +1)
| 0-64710183 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
754 | 65
| 0-62 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
755 | +1) == 0
| 0-62 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
756 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
757 | if (ignore_return
| 0-50877897 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
758 | command->value.Simple->flags |= 0x08; executed 13832348 times by 1 test: command->value.Simple->flags |= 0x08; Executed by:
| 13832348 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
759 | if (command->flags & 0x400
| 100-64710145 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
760 | command->value.Simple->flags |= 0x400; executed 100 times by 1 test: command->value.Simple->flags |= 0x400; Executed by:
| 100 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
761 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
762 | line_number_for_err_trap = line_number = command->value.Simple->line; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
763 | exec_result = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
764 | execute_simple_command (command->value.Simple, pipe_in, pipe_out, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
765 | asynchronous, fds_to_close); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
766 | line_number = save_line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
767 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
768 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
769 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
770 | dispose_used_env_vars (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
771 | if (already_making_children
| 12834-64648200 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
772 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
773 | stop_pipeline (asynchronous, (COMMAND *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
774 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
775 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
776 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
777 | if (asynchronous
| 148-38254 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
778 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
779 | do { if (interactive
never executed: } while (0);describe_pid (last_made_pid); | 0-148 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
780 | exec_result = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
781 | invert = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
782 | } executed 148 times by 1 test: end of block Executed by:
| 148 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
783 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
784 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
785 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
786 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
787 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
788 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
789 | if (last_made_pid != (pid_t)-1
| 0-38254 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
790 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
791 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
792 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
793 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
794 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
795 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
796 | exec_result = wait_for (last_made_pid); executed 38254 times by 1 test: exec_result = wait_for (last_made_pid); Executed by:
| 38254 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
797 | } executed 38401 times by 1 test: end of block Executed by:
| 38401 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
798 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
799 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
800 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
801 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
802 | if (was_error_trap
| 2-64699377 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
803 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
804 | last_command_exit_value = exec_result; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
805 | line_number = line_number_for_err_trap; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
806 | run_error_trap (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
807 | line_number = save_line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
808 | } executed 9 times by 1 test: end of block Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
809 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
810 | if (ignore_return == 0
| 37-50867129 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
811 | ((posixly_correct
| 0-50866319 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
812 | (exit_immediately_on_error
| 20-50820309 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
813 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
814 | last_command_exit_value = exec_result; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
815 | run_pending_traps (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
816 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
817 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
818 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
819 | if (exit_immediately_on_error
| 0-20 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
820 | unwind_protect_tag_on_stack ("saved-redirects")
| 3-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
821 | run_unwind_frame ("saved-redirects"); executed 3 times by 1 test: run_unwind_frame ("saved-redirects"); Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
822 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
823 | jump_to_top_level (4); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
824 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
825 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
826 | break; executed 64699415 times by 1 test: break; Executed by:
| 64699415 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
827 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
828 | case executed 2014469 times by 1 test: cm_for:case cm_for: Executed by:
executed 2014469 times by 1 test: case cm_for: Executed by:
| 2014469 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
829 | if (ignore_return
| 0-2014469 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
830 | command->value.For->flags |= 0x08; never executed: command->value.For->flags |= 0x08; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
831 | exec_result = execute_for_command (command->value.For); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
832 | break; executed 2002020 times by 1 test: break; Executed by:
| 2002020 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
833 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
834 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
835 | case executed 2607 times by 1 test: cm_arith_for:case cm_arith_for: Executed by:
executed 2607 times by 1 test: case cm_arith_for: Executed by:
| 2607 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
836 | if (ignore_return
| 0-2607 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
837 | command->value.ArithFor->flags |= 0x08; never executed: command->value.ArithFor->flags |= 0x08; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
838 | exec_result = execute_arith_for_command (command->value.ArithFor); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
839 | break; executed 2398 times by 1 test: break; Executed by:
| 2398 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
840 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
841 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
842 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
843 | case executed 9 times by 1 test: cm_select:case cm_select: Executed by:
executed 9 times by 1 test: case cm_select: Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
844 | if (ignore_return
| 0-9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
845 | command->value.Select->flags |= 0x08; never executed: command->value.Select->flags |= 0x08; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
846 | exec_result = execute_select_command (command->value.Select); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
847 | break; executed 9 times by 1 test: break; Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
848 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
849 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
850 | case executed 36947171 times by 1 test: cm_case:case cm_case: Executed by:
executed 36947171 times by 1 test: case cm_case: Executed by:
| 36947171 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
851 | if (ignore_return
| 3542-36943629 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
852 | command->value.Case->flags |= 0x08; executed 3542 times by 1 test: command->value.Case->flags |= 0x08; Executed by:
| 3542 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
853 | exec_result = execute_case_command (command->value.Case); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
854 | break; executed 36940300 times by 1 test: break; Executed by:
| 36940300 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
855 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
856 | case executed 3891252 times by 1 test: cm_while:case cm_while: Executed by:
executed 3891252 times by 1 test: case cm_while: Executed by:
| 3891252 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
857 | if (ignore_return
| 0-3891252 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
858 | command->value.While->flags |= 0x08; never executed: command->value.While->flags |= 0x08; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
859 | exec_result = execute_while_command (command->value.While); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
860 | break; executed 3889883 times by 1 test: break; Executed by:
| 3889883 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
861 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
862 | case executed 12 times by 1 test: cm_until:case cm_until: Executed by:
executed 12 times by 1 test: case cm_until: Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
863 | if (ignore_return
| 0-12 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
864 | command->value.While->flags |= 0x08; never executed: command->value.While->flags |= 0x08; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
865 | exec_result = execute_until_command (command->value.While); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
866 | break; executed 12 times by 1 test: break; Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
867 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
868 | case executed 8236 times by 1 test: cm_if:case cm_if: Executed by:
executed 8236 times by 1 test: case cm_if: Executed by:
| 8236 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
869 | if (ignore_return
| 0-8236 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
870 | command->value.If->flags |= 0x08; never executed: command->value.If->flags |= 0x08; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
871 | exec_result = execute_if_command (command->value.If); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
872 | break; executed 8225 times by 1 test: break; Executed by:
| 8225 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
873 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
874 | case executed 1640536 times by 1 test: cm_group:case cm_group: Executed by:
executed 1640536 times by 1 test: case cm_group: Executed by:
| 1640536 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
875 | if (asynchronous
| 0-1640536 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
876 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
877 | command->flags |= 0x02; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
878 | exec_result = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
879 | execute_command_internal (command, 1, pipe_in, pipe_out, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
880 | fds_to_close); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
881 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
882 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
883 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
884 | if (ignore_return
| 0-1636912 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
885 | command->value.Group->command->flags |= 0x08; executed 3624 times by 1 test: command->value.Group->command->flags |= 0x08; Executed by:
| 3624 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
886 | exec_result = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
887 | execute_command_internal (command->value.Group->command, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
888 | asynchronous, pipe_in, pipe_out, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
889 | fds_to_close); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
890 | } executed 1634193 times by 1 test: end of block Executed by:
| 1634193 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
891 | break; executed 1634193 times by 1 test: break; Executed by:
| 1634193 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
892 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
893 | case executed 62119848 times by 1 test: cm_connection:case cm_connection: Executed by:
executed 62119848 times by 1 test: case cm_connection: Executed by:
| 62119848 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
894 | exec_result = execute_connection (command, asynchronous, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
895 | pipe_in, pipe_out, fds_to_close); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
896 | if (asynchronous
| 8-62089467 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
897 | invert = 0; executed 8 times by 1 test: invert = 0; Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
898 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
899 | break; executed 62089475 times by 1 test: break; Executed by:
| 62089475 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
900 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
901 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
902 | case executed 6476018 times by 1 test: cm_arith:case cm_arith: Executed by:
executed 6476018 times by 1 test: case cm_arith: Executed by:
| 6476018 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
903 | was_error_trap = signal_is_trapped (
| 0-6476018 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
904 | 65
| 0-6476018 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
905 | +1)
| 0-6476018 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
906 | 65
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
907 | +1) == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
908 | if (ignore_return
| 4706-6471312 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
909 | command->value.Arith->flags |= 0x08; executed 4706 times by 1 test: command->value.Arith->flags |= 0x08; Executed by:
| 4706 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
910 | line_number_for_err_trap = save_line_number = line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
911 | exec_result = execute_arith_command (command->value.Arith); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
912 | line_number = save_line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
913 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
914 | if (was_error_trap
| 0-6476017 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
915 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
916 | last_command_exit_value = exec_result; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
917 | save_line_number = line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
918 | line_number = line_number_for_err_trap; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
919 | run_error_trap (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
920 | line_number = save_line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
921 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
922 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
923 | if (ignore_return == 0
| 0-6471311 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
924 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
925 | last_command_exit_value = exec_result; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
926 | run_pending_traps (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
927 | jump_to_top_level (4); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
928 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
929 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
930 | break; executed 6476017 times by 1 test: break; Executed by:
| 6476017 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
931 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
932 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
933 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
934 | case executed 630 times by 1 test: cm_cond:case cm_cond: Executed by:
executed 630 times by 1 test: case cm_cond: Executed by:
| 630 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
935 | was_error_trap = signal_is_trapped (
| 0-630 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
936 | 65
| 0-630 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
937 | +1)
| 0-630 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
938 | 65
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
939 | +1) == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
940 | if (ignore_return
| 145-485 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
941 | command->value.Cond->flags |= 0x08; executed 485 times by 1 test: command->value.Cond->flags |= 0x08; Executed by:
| 485 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
942 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
943 | line_number_for_err_trap = save_line_number = line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
944 | exec_result = execute_cond_command (command->value.Cond); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
945 | line_number = save_line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
946 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
947 | if (was_error_trap
| 0-629 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
948 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
949 | last_command_exit_value = exec_result; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
950 | save_line_number = line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
951 | line_number = line_number_for_err_trap; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
952 | run_error_trap (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
953 | line_number = save_line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
954 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
955 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
956 | if (ignore_return == 0
| 0-484 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
957 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
958 | last_command_exit_value = exec_result; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
959 | run_pending_traps (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
960 | jump_to_top_level (4); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
961 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
962 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
963 | break; executed 629 times by 1 test: break; Executed by:
| 629 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
964 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
965 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
966 | case executed 11160 times by 1 test: cm_function_def:case cm_function_def: Executed by:
executed 11160 times by 1 test: case cm_function_def: Executed by:
| 11160 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
967 | exec_result = execute_intern_function (command->value.Function_def->name, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
968 | command->value.Function_def); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
969 | break; executed 11159 times by 1 test: break; Executed by:
| 11159 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
970 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
971 | default never executed: :default: never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
972 | command_error ("execute_command", 1, command->type, 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
973 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
974 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
975 | if (my_undo_list
| 660640-177093095 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
976 | cleanup_redirects (my_undo_list); executed 660640 times by 1 test: cleanup_redirects (my_undo_list); Executed by:
| 660640 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
977 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
978 | if (exec_undo_list
| 26141-177727594 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
979 | dispose_redirects (exec_undo_list); executed 26141 times by 1 test: dispose_redirects (exec_undo_list); Executed by:
| 26141 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
980 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
981 | if (my_undo_list
| 0-177093095 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
982 | discard_unwind_frame ("loop_redirections"); executed 660640 times by 1 test: discard_unwind_frame ("loop_redirections"); Executed by:
| 660640 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
983 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
984 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
985 | if (saved_fifo
| 12810789-164942946 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
986 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
987 | nfifo = num_fifos (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
988 | if (nfifo > ofifo
| 660604-164282342 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
989 | close_new_fifos ((char *)ofifo_list, osize); executed 660604 times by 1 test: close_new_fifos ((char *)ofifo_list, osize); Executed by:
| 660604 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
990 | sh_xfree(((void *)ofifo_list), "execute_cmd.c", 1082); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
991 | discard_unwind_frame ("internal_fifos"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
992 | } executed 164942946 times by 1 test: end of block Executed by:
| 164942946 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
993 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
994 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
995 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
996 | if (invert
| 113-177753622 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
997 | exec_result = (
executed 113 times by 1 test: exec_result = (exec_result == 0) ? 1 : 0; Executed by:
| 52-113 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
998 | ? 1 executed 113 times by 1 test: exec_result = (exec_result == 0) ? 1 : 0; Executed by:
| 113 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
999 | : 0; executed 113 times by 1 test: exec_result = (exec_result == 0) ? 1 : 0; Executed by:
| 113 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1000 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1001 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1002 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1003 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1004 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1005 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1006 | switch (command->type) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1007 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1008 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1009 | case executed 6476017 times by 1 test: cm_arith:case cm_arith: Executed by:
executed 6476017 times by 1 test: case cm_arith: Executed by:
| 6476017 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1010 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1011 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1012 | case executed 629 times by 1 test: cm_cond:case cm_cond: Executed by:
executed 629 times by 1 test: case cm_cond: Executed by:
| 629 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1013 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1014 | set_pipestatus_from_exit (exec_result); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1015 | break; executed 6476646 times by 1 test: break; Executed by:
| 6476646 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1016 | default executed 171277089 times by 1 test: :default: Executed by:
executed 171277089 times by 1 test: default: Executed by:
| 171277089 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1017 | break; executed 171277089 times by 1 test: break; Executed by:
| 171277089 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1018 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1019 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1020 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1021 | last_command_exit_value = exec_result; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1022 | run_pending_traps (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1023 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1024 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1025 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1026 | currently_executing_command = (COMMAND *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1027 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1028 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1029 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1030 | return executed 177753735 times by 1 test: (last_command_exit_value);return (last_command_exit_value); Executed by:
executed 177753735 times by 1 test: return (last_command_exit_value); Executed by:
| 177753735 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1031 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1032 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1033 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1034 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1035 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1036 | extern struct timeval *difftimeval (struct timeval *, struct timeval *, struct timeval *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1037 | extern struct timeval *addtimeval (struct timeval *, struct timeval *, struct timeval *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1038 | extern int timeval_to_cpu (struct timeval *, struct timeval *, struct timeval *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1039 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1040 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1041 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1042 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1043 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1044 | static const int precs[] = { 0, 100, 10, 1 }; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1045 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1046 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1047 | static int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1048 | mkfmt (buf, prec, lng, sec, sec_fraction) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1049 | char *buf; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1050 | int prec, lng; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1051 | time_t sec; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1052 | int sec_fraction; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1053 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1054 | time_t min; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1055 | char abuf[((sizeof (time_t) * 8 - (! ((time_t) 0 < (time_t) -1))) * 302 / 1000 + 1 + (! ((time_t) 0 < (time_t) -1))) + 1]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1056 | int ind, aind; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1057 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1058 | ind = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1059 | abuf[sizeof(abuf) - 1] = '\0'; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1060 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1061 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1062 | if (lng
| 0-18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1063 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1064 | min = sec / 60; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1065 | sec %= 60; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1066 | aind = sizeof(abuf) - 2; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1067 | do | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1068 | abuf[aind--] = (min % 10) + '0'; never executed: abuf[aind--] = (min % 10) + '0'; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1069 | while (min /= 10
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1070 | aind++; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1071 | while (abuf[aind]
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1072 | buf[ind++] = abuf[aind++]; never executed: buf[ind++] = abuf[aind++]; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1073 | buf[ind++] = 'm'; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1074 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1075 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1076 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1077 | aind = sizeof (abuf) - 2; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1078 | do | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1079 | abuf[aind--] = (sec % 10) + '0'; executed 18 times by 1 test: abuf[aind--] = (sec % 10) + '0'; Executed by:
| 18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1080 | while (sec /= 10
| 0-18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1081 | aind++; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1082 | while (abuf[aind]
| 18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1083 | buf[ind++] = abuf[aind++]; executed 18 times by 1 test: buf[ind++] = abuf[aind++]; Executed by:
| 18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1084 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1085 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1086 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1087 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1088 | if (prec != 0
| 0-18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1089 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1090 | buf[ind++] = locale_decpoint (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1091 | for (aind = 1; aind <= prec
| 18-36 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1092 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1093 | buf[ind++] = (sec_fraction / precs[aind]) + '0'; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1094 | sec_fraction %= precs[aind]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1095 | } executed 36 times by 1 test: end of block Executed by:
| 36 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1096 | } executed 18 times by 1 test: end of block Executed by:
| 18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1097 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1098 | if (lng
| 0-18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1099 | buf[ind++] = 's'; never executed: buf[ind++] = 's'; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1100 | buf[ind] = '\0'; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1101 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1102 | return executed 18 times by 1 test: (ind);return (ind); Executed by:
executed 18 times by 1 test: return (ind); Executed by:
| 18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1103 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1104 | static void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1105 | print_formatted_time (fp, format, rs, rsf, us, usf, ss, ssf, cpu) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1106 | FILE *fp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1107 | char *format; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1108 | time_t rs; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1109 | int rsf; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1110 | time_t us; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1111 | int usf; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1112 | time_t ss; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1113 | int ssf, cpu; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1114 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1115 | int prec, lng, len; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1116 | char *str, *s, ts[((sizeof (time_t) * 8 - (! ((time_t) 0 < (time_t) -1))) * 302 / 1000 + 1 + (! ((time_t) 0 < (time_t) -1))) + sizeof ("mSS.FFFF")]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1117 | time_t sum; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1118 | int sum_frac; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1119 | int sindex, ssize; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1120 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1121 | len = strlen (format); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1122 | ssize = (len + 64) - (len % 64); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1123 | str = (char *)sh_xmalloc((ssize), "execute_cmd.c", 1231); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1124 | sindex = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1125 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1126 | for (s = format; *
| 6-114 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1127 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1128 | if (*
| 0-96 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1129 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1130 | do { if ((
never executed: str = sh_xrealloc((str), (ssize), "execute_cmd.c", 1238); }ssize += (64); never executed: } while (0);end of block | 0-96 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1131 | str[sindex++] = *s; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1132 | } executed 96 times by 1 test: end of block Executed by:
| 96 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1133 | else if (s[1] == '%'
| 0-18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1134 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1135 | s++; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1136 | do { if ((
never executed: str = sh_xrealloc((str), (ssize), "execute_cmd.c", 1244); }ssize += (64); never executed: } while (0);end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1137 | str[sindex++] = *s; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1138 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1139 | else if (s[1] == 'P'
| 0-18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1140 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1141 | s++; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1142 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1143 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1144 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1145 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1146 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1147 | sum = cpu / 100; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1148 | sum_frac = (cpu % 100) * 10; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1149 | len = mkfmt (ts, 2, 0, sum, sum_frac); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1150 | do { if ((
never executed: str = sh_xrealloc((str), (ssize), "execute_cmd.c", 1258); }ssize += (64); never executed: } while (0);end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1151 | strcpy (str + sindex, ts); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1152 | sindex += len; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1153 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1154 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1155 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1156 | prec = 3; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1157 | lng = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1158 | s++; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1159 | if (((*
| 0-18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1160 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1161 | prec = *s++ - '0'; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1162 | if (prec > 3
never executed: prec = 3; | 0-18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1163 | } executed 18 times by 1 test: end of block Executed by:
| 18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1164 | if (*
| 0-18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1165 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1166 | lng = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1167 | s++; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1168 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1169 | if (*
| 0-12 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1170 | len = mkfmt (ts, prec, lng, rs, rsf); executed 6 times by 1 test: len = mkfmt (ts, prec, lng, rs, rsf); Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1171 | else if (*
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1172 | len = mkfmt (ts, prec, lng, us, usf); executed 6 times by 1 test: len = mkfmt (ts, prec, lng, us, usf); Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1173 | else if (*
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1174 | len = mkfmt (ts, prec, lng, ss, ssf); executed 6 times by 1 test: len = mkfmt (ts, prec, lng, ss, ssf); Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1175 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1176 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1177 | internal_error ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1178 | dcgettext (((void *)0), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1179 | "TIMEFORMAT: `%c': invalid format character" | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1180 | , 5) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1181 | , *s); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1182 | sh_xfree((str), "execute_cmd.c", 1286); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1183 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1184 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1185 | do { if ((
never executed: str = sh_xrealloc((str), (ssize), "execute_cmd.c", 1289); }ssize += (64); never executed: } while (0);end of block | 0-18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1186 | strcpy (str + sindex, ts); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1187 | sindex += len; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1188 | } executed 18 times by 1 test: end of block Executed by:
| 18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1189 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1190 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1191 | str[sindex] = '\0'; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1192 | fprintf (fp, "%s\n", str); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1193 | fflush (fp); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1194 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1195 | sh_xfree((str), "execute_cmd.c", 1299); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1196 | } executed 6 times by 1 test: end of block Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1197 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1198 | static int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1199 | time_command (command, asynchronous, pipe_in, pipe_out, fds_to_close) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1200 | COMMAND *command; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1201 | int asynchronous, pipe_in, pipe_out; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1202 | struct fd_bitmap *fds_to_close; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1203 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1204 | int rv, posix_time, old_flags, nullcmd, code; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1205 | time_t rs, us, ss; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1206 | int rsf, usf, ssf; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1207 | int cpu; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1208 | char *time_format; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1209 | volatile sigjmp_buf save_top_level; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1210 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1211 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1212 | struct timeval real, user, sys; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1213 | struct timeval before, after; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1214 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1215 | struct timezone dtz; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1216 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1217 | struct rusage selfb, selfa, kidsb, kidsa; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1218 | gettimeofday (&before, &dtz); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1219 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1220 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1221 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1222 | getrusage ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1223 | RUSAGE_SELF | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1224 | , &selfb); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1225 | getrusage ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1226 | RUSAGE_CHILDREN | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1227 | , &kidsb); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1228 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1229 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1230 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1231 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1232 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1233 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1234 | posix_time = command
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1235 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1236 | nullcmd = (
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1237 | if (posixly_correct
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1238 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1239 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1240 | selfb.ru_utime.tv_sec = kidsb.ru_utime.tv_sec = selfb.ru_stime.tv_sec = kidsb.ru_stime.tv_sec = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1241 | selfb.ru_utime.tv_usec = kidsb.ru_utime.tv_usec = selfb.ru_stime.tv_usec = kidsb.ru_stime.tv_usec = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1242 | before.tv_sec = shell_start_time; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1243 | before.tv_usec = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1244 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1245 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1246 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1247 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1248 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1249 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1250 | old_flags = command->flags; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1251 | xbcopy ((char *)top_level, (char *)save_top_level, sizeof (sigjmp_buf));; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1252 | command->flags &= ~(0x80|0x100); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1253 | code = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1254 | __sigsetjmp ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1255 | (top_level) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1256 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1257 | 0 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1258 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1259 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1260 | if (code == 0
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1261 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1262 | rv = execute_command_internal (command, asynchronous, pipe_in, pipe_out, fds_to_close); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1263 | command->flags = old_flags; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1264 | } executed 6 times by 1 test: end of block Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1265 | xbcopy ((char *)save_top_level, (char *)top_level, sizeof (sigjmp_buf));; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1266 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1267 | rs = us = ss = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1268 | rsf = usf = ssf = cpu = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1269 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1270 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1271 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1272 | gettimeofday (&after, &dtz); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1273 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1274 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1275 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1276 | getrusage ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1277 | RUSAGE_SELF | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1278 | , &selfa); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1279 | getrusage ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1280 | RUSAGE_CHILDREN | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1281 | , &kidsa); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1282 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1283 | difftimeval (&real, &before, &after); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1284 | timeval_to_secs (&real, &rs, &rsf); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1285 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1286 | addtimeval (&user, difftimeval(&after, &selfb.ru_utime, &selfa.ru_utime), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1287 | difftimeval(&before, &kidsb.ru_utime, &kidsa.ru_utime)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1288 | timeval_to_secs (&user, &us, &usf); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1289 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1290 | addtimeval (&sys, difftimeval(&after, &selfb.ru_stime, &selfa.ru_stime), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1291 | difftimeval(&before, &kidsb.ru_stime, &kidsa.ru_stime)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1292 | timeval_to_secs (&sys, &ss, &ssf); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1293 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1294 | cpu = timeval_to_cpu (&real, &user, &sys); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1295 | if (posix_time
| 3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1296 | time_format = "real %2R\nuser %2U\nsys %2S"; executed 3 times by 1 test: time_format = "real %2R\nuser %2U\nsys %2S"; Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1297 | else if ((
| 0-3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1298 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1299 | if (posixly_correct
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1300 | time_format = "user\t%2lU\nsys\t%2lS"; never executed: time_format = "user\t%2lU\nsys\t%2lS"; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1301 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1302 | time_format = "\nreal\t%3lR\nuser\t%3lU\nsys\t%3lS"; never executed: time_format = "\nreal\t%3lR\nuser\t%3lU\nsys\t%3lS"; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1303 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1304 | if (time_format
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1305 | print_formatted_time ( executed 6 times by 1 test: print_formatted_time ( stderr , time_format, rs, rsf, us, usf, ss, ssf, cpu); Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1306 | stderr executed 6 times by 1 test: print_formatted_time ( stderr , time_format, rs, rsf, us, usf, ss, ssf, cpu); Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1307 | , time_format, rs, rsf, us, usf, ss, ssf, cpu); executed 6 times by 1 test: print_formatted_time ( stderr , time_format, rs, rsf, us, usf, ss, ssf, cpu); Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1308 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1309 | if (code
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1310 | siglongjmp((top_level), (code)); never executed: siglongjmp((top_level), (code)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1311 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1312 | return executed 6 times by 1 test: rv;return rv; Executed by:
executed 6 times by 1 test: return rv; Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1313 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1314 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1315 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1316 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1317 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1318 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1319 | static int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1320 | execute_in_subshell (command, asynchronous, pipe_in, pipe_out, fds_to_close) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1321 | COMMAND *command; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1322 | int asynchronous; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1323 | int pipe_in, pipe_out; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1324 | struct fd_bitmap *fds_to_close; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1325 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1326 | volatile int user_subshell, user_coproc, invert; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1327 | int return_code, function_value, should_redir_stdin, ois, result; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1328 | volatile COMMAND *tcom; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1329 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1330 | ((void) &(user_subshell)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1331 | ((void) &(user_coproc)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1332 | ((void) &(invert)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1333 | ((void) &(tcom)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1334 | ((void) &(asynchronous)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1335 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1336 | subshell_level++; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1337 | should_redir_stdin = (asynchronous
| 4-1102 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1338 | pipe_in == -1
| 0-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1339 | stdin_redirects (command->redirects) == 0
| 0-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1340 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1341 | invert = (command->flags & 0x04) != 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1342 | user_subshell = command->type == cm_subshell
| 8-1060 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1343 | user_coproc = command->type == cm_coproc; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1344 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1345 | command->flags &= ~(0x02 | 0x01 | 0x04); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1346 | if (asynchronous
| 20-1102 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1347 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1348 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1349 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1350 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1351 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1352 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1353 | original_pgrp = -1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1354 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1355 | ois = interactive_shell; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1356 | interactive_shell = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1357 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1358 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1359 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1360 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1361 | if (ois != interactive_shell
| 0-20 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1362 | expand_aliases = 0; never executed: expand_aliases = 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1363 | } executed 20 times by 1 test: end of block Executed by:
| 20 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1364 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1365 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1366 | login_shell = interactive = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1367 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1368 | if (user_subshell
| 54-1068 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1369 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1370 | subshell_environment = 0x02; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1371 | if (asynchronous
| 11-1057 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1372 | subshell_environment |= 0x01; executed 11 times by 1 test: subshell_environment |= 0x01; Executed by:
| 11 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1373 | } executed 1068 times by 1 test: end of block Executed by:
| 1068 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1374 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1375 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1376 | subshell_environment = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1377 | if (asynchronous
| 9-45 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1378 | subshell_environment |= 0x01; executed 9 times by 1 test: subshell_environment |= 0x01; Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1379 | if (pipe_in != -1
| 7-38 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1380 | subshell_environment |= 0x10; executed 45 times by 1 test: subshell_environment |= 0x10; Executed by:
| 45 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1381 | if (user_coproc
| 0-54 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1382 | subshell_environment |= 0x40; never executed: subshell_environment |= 0x40; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1383 | } executed 54 times by 1 test: end of block Executed by:
| 54 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1384 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1385 | reset_terminating_signals (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1386 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1387 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1388 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1389 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1390 | reset_signal_handlers (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1391 | subshell_environment |= 0x80; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1392 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1393 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1394 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1395 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1396 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1397 | if (asynchronous
| 20-1102 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1398 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1399 | setup_async_signals (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1400 | asynchronous = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1401 | } executed 20 times by 1 test: end of block Executed by:
| 20 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1402 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1403 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1404 | set_sigchld_handler (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1405 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1406 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1407 | set_sigint_handler (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1408 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1409 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1410 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1411 | without_job_control (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1412 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1413 | if (fds_to_close
| 0-1122 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1414 | close_fd_bitmap (fds_to_close); executed 1122 times by 1 test: close_fd_bitmap (fds_to_close); Executed by:
| 1122 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1415 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1416 | do_piping (pipe_in, pipe_out); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1417 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1418 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1419 | coproc_closeall (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1420 | if (user_subshell
| 54-1068 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1421 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1422 | stdin_redir = stdin_redirects (command->redirects)
| 0-1068 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1423 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1424 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1425 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1426 | } executed 1068 times by 1 test: end of block Executed by:
| 1068 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1427 | else if (shell_control_structure (command->type)
| 0-54 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1428 | stdin_redir = 1; executed 38 times by 1 test: stdin_redir = 1; Executed by:
| 38 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1429 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1430 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1431 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1432 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1433 | if (should_redir_stdin
| 0-1118 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1434 | async_redirect_stdin (); executed 4 times by 1 test: async_redirect_stdin (); Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1435 | if (command->redirects
| 70-1052 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1436 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1437 | if (do_redirections (command->redirects, 0x01) != 0
| 0-70 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1438 | exit (invert ? 0 : 1); never executed: exit (invert ? 0 : 1); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1439 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1440 | dispose_redirects (command->redirects); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1441 | command->redirects = (REDIRECT *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1442 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1443 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1444 | } executed 70 times by 1 test: end of block Executed by:
| 70 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1445 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1446 | if (command->type == cm_subshell
| 62-1060 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1447 | tcom = command->value.Subshell->command; executed 1060 times by 1 test: tcom = command->value.Subshell->command; Executed by:
| 1060 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1448 | else if (user_coproc
| 8-54 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1449 | tcom = command->value.Coproc->command; executed 8 times by 1 test: tcom = command->value.Coproc->command; Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1450 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1451 | tcom = command; executed 54 times by 1 test: tcom = command; Executed by:
| 54 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1452 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1453 | if (command->flags & 0x80
| 0-1122 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1454 | tcom->flags |= 0x80; never executed: tcom->flags |= 0x80; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1455 | if (command->flags & 0x100
| 0-1122 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1456 | tcom->flags |= 0x100; never executed: tcom->flags |= 0x100; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1457 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1458 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1459 | if ((
| 1-1063 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1460 | tcom->flags |= 0x08; executed 58 times by 1 test: tcom->flags |= 0x08; Executed by:
| 58 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1461 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1462 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1463 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1464 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1465 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1466 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1467 | if ((user_subshell
| 0-1068 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1468 | ((
| 0-93 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1469 | ((
| 6-87 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1470 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1471 | tcom->flags |= 0x40; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1472 | if (tcom->type == cm_simple
| 2-85 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1473 | tcom->value.Simple->flags |= 0x40; executed 85 times by 1 test: tcom->value.Simple->flags |= 0x40; Executed by:
| 85 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1474 | } executed 87 times by 1 test: end of block Executed by:
| 87 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1475 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1476 | invert = (tcom->flags & 0x04) != 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1477 | tcom->flags &= ~0x04; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1478 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1479 | result = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1480 | __sigsetjmp ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1481 | (top_level) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1482 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1483 | 0 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1484 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1485 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1486 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1487 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1488 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1489 | function_value = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1490 | if (return_catch_flag
| 384-792 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1491 | function_value = executed 792 times by 1 test: function_value = __sigsetjmp ( (return_catch) , 0 ) ; Executed by:
| 792 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1492 | __sigsetjmp ( executed 792 times by 1 test: function_value = __sigsetjmp ( (return_catch) , 0 ) ; Executed by:
| 792 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1493 | (return_catch) executed 792 times by 1 test: function_value = __sigsetjmp ( (return_catch) , 0 ) ; Executed by:
| 792 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1494 | , executed 792 times by 1 test: function_value = __sigsetjmp ( (return_catch) , 0 ) ; Executed by:
| 792 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1495 | 0 executed 792 times by 1 test: function_value = __sigsetjmp ( (return_catch) , 0 ) ; Executed by:
| 792 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1496 | ) executed 792 times by 1 test: function_value = __sigsetjmp ( (return_catch) , 0 ) ; Executed by:
| 792 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1497 | ; executed 792 times by 1 test: function_value = __sigsetjmp ( (return_catch) , 0 ) ; Executed by:
| 792 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1498 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1499 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1500 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1501 | if (result == 3
| 21-1156 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1502 | invert = 0, return_code = last_command_exit_value; executed 21 times by 1 test: invert = 0, return_code = last_command_exit_value; Executed by:
| 21 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1503 | else if (result
| 33-1123 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1504 | return_code = (
executed 33 times by 1 test: return_code = (last_command_exit_value == 0) ? 1 : last_command_exit_value; Executed by:
| 0-33 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1505 | else if (function_value
| 1-1122 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1506 | return_code = return_catch_value; executed 1 time by 1 test: return_code = return_catch_value; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1507 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1508 | return_code = execute_command_internal ((COMMAND *)tcom, asynchronous, -1, -1, fds_to_close); executed 1122 times by 1 test: return_code = execute_command_internal ((COMMAND *)tcom, asynchronous, -1, -1, fds_to_close); Executed by:
| 1122 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1509 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1510 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1511 | if (invert
| 4-987 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1512 | return_code = (
executed 4 times by 1 test: return_code = (return_code == 0) ? 1 : 0; Executed by:
| 2-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1513 | : 0; executed 4 times by 1 test: return_code = (return_code == 0) ? 1 : 0; Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1514 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1515 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1516 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1517 | if (user_subshell
| 12-939 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1518 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1519 | last_command_exit_value = return_code; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1520 | return_code = run_exit_trap (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1521 | } executed 12 times by 1 test: end of block Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1522 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1523 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1524 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1525 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1526 | return executed 991 times by 1 test: (return_code);return (return_code); Executed by:
executed 991 times by 1 test: return (return_code); Executed by:
| 991 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1527 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1528 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1529 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1530 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1531 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1532 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1533 | typedef struct cpelement | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1534 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1535 | struct cpelement *next; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1536 | struct coproc *coproc; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1537 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1538 | cpelement_t; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1539 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1540 | typedef struct cplist | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1541 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1542 | struct cpelement *head; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1543 | struct cpelement *tail; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1544 | int ncoproc; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1545 | int lock; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1546 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1547 | cplist_t; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1548 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1549 | static struct cpelement *cpe_alloc (struct coproc *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1550 | static void cpe_dispose (struct cpelement *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1551 | static struct cpelement *cpl_add (struct coproc *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1552 | static struct cpelement *cpl_delete (pid_t); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1553 | static void cpl_reap (void); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1554 | static void cpl_flush (void); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1555 | static void cpl_closeall (void); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1556 | static struct cpelement *cpl_search (pid_t); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1557 | static struct cpelement *cpl_searchbyname (const char *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1558 | static void cpl_prune (void); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1559 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1560 | static void coproc_free (struct coproc *); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1561 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1562 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1563 | Coproc sh_coproc = { 0, (pid_t)-1, -1, -1, 0, 0, 0, 0, 0 }; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1564 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1565 | cplist_t coproc_list = {0, 0, 0}; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1566 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1567 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1568 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1569 | static struct cpelement * | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1570 | cpe_alloc (cp) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1571 | Coproc *cp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1572 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1573 | struct cpelement *cpe; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1574 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1575 | cpe = (struct cpelement *)sh_xmalloc((sizeof (struct cpelement)), "execute_cmd.c", 1715); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1576 | cpe->coproc = cp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1577 | cpe->next = (struct cpelement *)0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1578 | return never executed: cpe;return cpe; never executed: return cpe; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1579 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1580 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1581 | static void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1582 | cpe_dispose (cpe) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1583 | struct cpelement *cpe; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1584 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1585 | sh_xfree((cpe), "execute_cmd.c", 1725); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1586 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1587 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1588 | static struct cpelement * | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1589 | cpl_add (cp) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1590 | Coproc *cp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1591 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1592 | struct cpelement *cpe; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1593 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1594 | cpe = cpe_alloc (cp); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1595 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1596 | if (coproc_list.head == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1597 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1598 | coproc_list.head = coproc_list.tail = cpe; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1599 | coproc_list.ncoproc = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1600 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1601 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1602 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1603 | coproc_list.tail->next = cpe; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1604 | coproc_list.tail = cpe; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1605 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1606 | coproc_list.ncoproc++; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1607 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1608 | return never executed: cpe;return cpe; never executed: return cpe; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1609 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1610 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1611 | static struct cpelement * | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1612 | cpl_delete (pid) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1613 | pid_t pid; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1614 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1615 | struct cpelement *prev, *p; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1616 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1617 | for (prev = p = coproc_list.head; p
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1618 | if (p->coproc->c_pid == pid
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1619 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1620 | prev->next = p->next; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1621 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1622 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1623 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1624 | if (p == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1625 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1626 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1627 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1628 | itrace("cpl_delete: deleting %d", pid); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1629 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1630 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1631 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1632 | if (p == coproc_list.head
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1633 | coproc_list.head = coproc_list.head->next; never executed: coproc_list.head = coproc_list.head->next; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1634 | else if (p == coproc_list.tail
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1635 | coproc_list.tail = prev; never executed: coproc_list.tail = prev; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1636 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1637 | coproc_list.ncoproc--; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1638 | if (coproc_list.ncoproc == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1639 | coproc_list.head = coproc_list.tail = 0; never executed: coproc_list.head = coproc_list.tail = 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1640 | else if (coproc_list.ncoproc == 1
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1641 | coproc_list.tail = coproc_list.head; never executed: coproc_list.tail = coproc_list.head; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1642 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1643 | return never executed: (p);return (p); never executed: return (p); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1644 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1645 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1646 | static void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1647 | cpl_reap () | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1648 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1649 | struct cpelement *p, *next, *nh, *nt; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1650 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1651 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1652 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1653 | nh = nt = next = (struct cpelement *)0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1654 | for (p = coproc_list.head; p
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1655 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1656 | next = p->next; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1657 | if (p->coproc->c_flags & 0x02
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1658 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1659 | coproc_list.ncoproc--; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1660 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1661 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1662 | itrace("cpl_reap: deleting %d", p->coproc->c_pid); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1663 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1664 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1665 | coproc_dispose (p->coproc); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1666 | cpe_dispose (p); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1667 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1668 | else if (nh == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1669 | nh = nt = p; never executed: nh = nt = p; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1670 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1671 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1672 | nt->next = p; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1673 | nt = nt->next; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1674 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1675 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1676 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1677 | if (coproc_list.ncoproc == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1678 | coproc_list.head = coproc_list.tail = 0; never executed: coproc_list.head = coproc_list.tail = 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1679 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1680 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1681 | if (nt
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1682 | nt->next = 0; never executed: nt->next = 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1683 | coproc_list.head = nh; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1684 | coproc_list.tail = nt; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1685 | if (coproc_list.ncoproc == 1
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1686 | coproc_list.tail = coproc_list.head; never executed: coproc_list.tail = coproc_list.head; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1687 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1688 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1689 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1690 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1691 | static void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1692 | cpl_flush () | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1693 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1694 | struct cpelement *cpe, *p; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1695 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1696 | for (cpe = coproc_list.head; cpe
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1697 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1698 | p = cpe; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1699 | cpe = cpe->next; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1700 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1701 | coproc_dispose (p->coproc); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1702 | cpe_dispose (p); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1703 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1704 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1705 | coproc_list.head = coproc_list.tail = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1706 | coproc_list.ncoproc = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1707 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1708 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1709 | static void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1710 | cpl_closeall () | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1711 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1712 | struct cpelement *cpe; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1713 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1714 | for (cpe = coproc_list.head; cpe
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1715 | coproc_close (cpe->coproc); never executed: coproc_close (cpe->coproc); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1716 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1717 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1718 | static void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1719 | cpl_fdchk (fd) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1720 | int fd; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1721 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1722 | struct cpelement *cpe; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1723 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1724 | for (cpe = coproc_list.head; cpe
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1725 | coproc_checkfd (cpe->coproc, fd); never executed: coproc_checkfd (cpe->coproc, fd); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1726 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1727 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1728 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1729 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1730 | static struct cpelement * | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1731 | cpl_search (pid) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1732 | pid_t pid; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1733 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1734 | struct cpelement *cpe; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1735 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1736 | for (cpe = coproc_list.head ; cpe
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1737 | if (cpe->coproc->c_pid == pid
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1738 | return never executed: cpe;return cpe; never executed: return cpe; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1739 | return never executed: (struct cpelement *)return (struct cpelement *) ((void *)0) ; never executed: return (struct cpelement *) ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1740 | ((void *)0) never executed: return (struct cpelement *) ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1741 | ; never executed: return (struct cpelement *) ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1742 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1743 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1744 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1745 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1746 | static struct cpelement * | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1747 | cpl_searchbyname (name) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1748 | const char *name; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1749 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1750 | struct cpelement *cp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1751 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1752 | for (cp = coproc_list.head ; cp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1753 | if (((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1754 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1755 | cp->coproc->c_name
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1756 | ) && __builtin_constant_p (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1757 | name
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1758 | ) && (__s1_len = __builtin_strlen (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1759 | cp->coproc->c_name
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1760 | ), __s2_len = __builtin_strlen (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1761 | name
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1762 | ), (!((size_t)(const void *)((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1763 | cp->coproc->c_name
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1764 | ) + 1) - (size_t)(const void *)(
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1765 | cp->coproc->c_name
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1766 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1767 | name
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1768 | ) + 1) - (size_t)(const void *)(
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1769 | name
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1770 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1771 | cp->coproc->c_name
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1772 | ,
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1773 | name
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1774 | ) : (__builtin_constant_p (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1775 | cp->coproc->c_name
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1776 | ) && ((size_t)(const void *)((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1777 | cp->coproc->c_name
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1778 | ) + 1) - (size_t)(const void *)(
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1779 | cp->coproc->c_name
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1780 | ) == 1) && (__s1_len = __builtin_strlen (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1781 | cp->coproc->c_name
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1782 | ), __s1_len < 4) ? (__builtin_constant_p (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1783 | name
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1784 | ) && ((size_t)(const void *)((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1785 | name
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1786 | ) + 1) - (size_t)(const void *)(
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1787 | name
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1788 | ) == 1) ? __builtin_strcmp (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1789 | cp->coproc->c_name
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1790 | ,
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1791 | name
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1792 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1793 | name
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1794 | ); int __result = (((const unsigned char *) (const char *) (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1795 | cp->coproc->c_name
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1796 | ))[0] - __s2[0]); if (__s1_len > 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1797 | cp->coproc->c_name
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1798 | ))[1] - __s2[1]); if (__s1_len > 1
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1799 | cp->coproc->c_name
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1800 | ))[2] - __s2[2]); if (__s1_len > 2
never executed: __result = (((const unsigned char *) (const char *) ( cp->coproc->c_name ))[3] - __s2[3]); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1801 | cp->coproc->c_name
never executed: __result = (((const unsigned char *) (const char *) ( cp->coproc->c_name ))[3] - __s2[3]); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1802 | ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1803 | name
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1804 | ) && ((size_t)(const void *)((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1805 | name
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1806 | ) + 1) - (size_t)(const void *)(
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1807 | name
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1808 | ) == 1) && (__s2_len = __builtin_strlen (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1809 | name
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1810 | ), __s2_len < 4) ? (__builtin_constant_p (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1811 | cp->coproc->c_name
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1812 | ) && ((size_t)(const void *)((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1813 | cp->coproc->c_name
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1814 | ) + 1) - (size_t)(const void *)(
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1815 | cp->coproc->c_name
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1816 | ) == 1) ? __builtin_strcmp (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1817 | cp->coproc->c_name
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1818 | ,
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1819 | name
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1820 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1821 | cp->coproc->c_name
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1822 | ); int __result = (((const unsigned char *) (const char *) (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1823 | name
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1824 | ))[0] - __s2[0]); if (__s2_len > 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1825 | name
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1826 | ))[1] - __s2[1]); if (__s2_len > 1
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1827 | name
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1828 | ))[2] - __s2[2]); if (__s2_len > 2
never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1829 | name
never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1830 | ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1831 | cp->coproc->c_name
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1832 | ,
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1833 | name
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1834 | )))); })
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1835 | == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1836 | return never executed: cp;return cp; never executed: return cp; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1837 | return never executed: (struct cpelement *)return (struct cpelement *) ((void *)0) ; never executed: return (struct cpelement *) ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1838 | ((void *)0) never executed: return (struct cpelement *) ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1839 | ; never executed: return (struct cpelement *) ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1840 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1841 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1842 | static pid_t | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1843 | cpl_firstactive () | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1844 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1845 | struct cpelement *cpe; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1846 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1847 | for (cpe = coproc_list.head ; cpe
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1848 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1849 | return never executed: cpe->coproc->c_pid;return cpe->coproc->c_pid; never executed: return cpe->coproc->c_pid; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1850 | return never executed: (pid_t)(pid_t)-1;return (pid_t)(pid_t)-1; never executed: return (pid_t)(pid_t)-1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1851 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1852 | struct coproc * | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1853 | getcoprocbypid (pid) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1854 | pid_t pid; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1855 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1856 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1857 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1858 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1859 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1860 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1861 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1862 | return executed 3985831 times by 1 test: (pid == sh_coproc.c_pid ? &sh_coproc : 0);return (pid == sh_coproc.c_pid ? &sh_coproc : 0); Executed by:
executed 3985831 times by 1 test: return (pid == sh_coproc.c_pid ? &sh_coproc : 0); Executed by:
| 3985831 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1863 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1864 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1865 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1866 | struct coproc * | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1867 | getcoprocbyname (name) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1868 | const char *name; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1869 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1870 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1871 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1872 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1873 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1874 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1875 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1876 | return never executed: ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1877 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1878 | sh_coproc.c_name never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1879 | ) && __builtin_constant_p ( never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1880 | name never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1881 | ) && (__s1_len = __builtin_strlen ( never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1882 | sh_coproc.c_name never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1883 | ), __s2_len = __builtin_strlen ( never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1884 | name never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1885 | ), (!((size_t)(const void *)(( never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1886 | sh_coproc.c_name never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1887 | ) + 1) - (size_t)(const void *)( never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1888 | sh_coproc.c_name never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1889 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(( never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1890 | name never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1891 | ) + 1) - (size_t)(const void *)( never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1892 | name never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1893 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp ( never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1894 | sh_coproc.c_name never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1895 | , never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1896 | name never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1897 | ) : (__builtin_constant_p ( never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1898 | sh_coproc.c_name never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1899 | ) && ((size_t)(const void *)(( never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1900 | sh_coproc.c_name never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1901 | ) + 1) - (size_t)(const void *)( never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1902 | sh_coproc.c_name never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1903 | ) == 1) && (__s1_len = __builtin_strlen ( never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1904 | sh_coproc.c_name never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1905 | ), __s1_len < 4) ? (__builtin_constant_p ( never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1906 | name never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1907 | ) && ((size_t)(const void *)(( never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1908 | name never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1909 | ) + 1) - (size_t)(const void *)( never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1910 | name never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1911 | ) == 1) ? __builtin_strcmp ( never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1912 | sh_coproc.c_name never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1913 | , never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1914 | name never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1915 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ( never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1916 | name never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1917 | ); int __result = (((const unsigned char *) (const char *) ( never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1918 | sh_coproc.c_name never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1919 | ))[0] - __s2[0]); if (__s1_len > 0
never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1920 | sh_coproc.c_name never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1921 | ))[1] - __s2[1]); if (__s1_len > 1
never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1922 | sh_coproc.c_name never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1923 | ))[2] - __s2[2]); if (__s1_len > 2
never executed: __result = (((const unsigned char *) (const char *) ( sh_coproc.c_name ))[3] - __s2[3]); never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1924 | sh_coproc.c_name never executed: __result = (((const unsigned char *) (const char *) ( sh_coproc.c_name ))[3] - __s2[3]); never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1925 | ))[3] - __s2[3]); never executed: }__result = (((const unsigned char *) (const char *) ( sh_coproc.c_name ))[3] - __s2[3]); never executed: }end of block never executed: __result; }))) : (__builtin_constant_p (end of block never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1926 | name never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1927 | ) && ((size_t)(const void *)(( never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1928 | name never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1929 | ) + 1) - (size_t)(const void *)( never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1930 | name never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1931 | ) == 1) && (__s2_len = __builtin_strlen ( never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1932 | name never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1933 | ), __s2_len < 4) ? (__builtin_constant_p ( never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1934 | sh_coproc.c_name never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1935 | ) && ((size_t)(const void *)(( never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1936 | sh_coproc.c_name never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1937 | ) + 1) - (size_t)(const void *)( never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1938 | sh_coproc.c_name never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1939 | ) == 1) ? __builtin_strcmp ( never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1940 | sh_coproc.c_name never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1941 | , never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1942 | name never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1943 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ( never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1944 | sh_coproc.c_name never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1945 | ); int __result = (((const unsigned char *) (const char *) ( never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1946 | name never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1947 | ))[0] - __s2[0]); if (__s2_len > 0
never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1948 | name never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1949 | ))[1] - __s2[1]); if (__s2_len > 1
never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1950 | name never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1951 | ))[2] - __s2[2]); if (__s2_len > 2
never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1952 | name never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1953 | ))[3] - __s2[3]); never executed: }__result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); never executed: }end of block never executed: __result; }))) : __builtin_strcmp (end of block never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1954 | sh_coproc.c_name never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1955 | , never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1956 | name never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1957 | )))); }) never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1958 | == 0)) ? &sh_coproc : 0); never executed: return ((sh_coproc.c_name && ((sh_coproc.c_name)[0] == (name)[0] && __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( sh_coproc.c_name ) && __builtin_constant_p ( name ) && (__s1_len = __builtin_strlen ( sh_coproc.c_name ), __s2_len = __...r *) (const char *) ( name ))[2] - __s2[2]); if (__s2_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp ( sh_coproc.c_name , name )))); }) == 0)) ? &sh_coproc : 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1959 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1960 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1961 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1962 | void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1963 | coproc_init (cp) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1964 | struct coproc *cp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1965 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1966 | cp->c_name = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1967 | cp->c_pid = (pid_t)-1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1968 | cp->c_rfd = cp->c_wfd = -1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1969 | cp->c_rsave = cp->c_wsave = -1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1970 | cp->c_flags = cp->c_status = cp->c_lock = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1971 | } executed 626 times by 1 test: end of block Executed by:
| 626 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1972 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1973 | struct coproc * | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1974 | coproc_alloc (name, pid) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1975 | char *name; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1976 | pid_t pid; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1977 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1978 | struct coproc *cp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1979 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1980 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1981 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1982 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1983 | cp = &sh_coproc; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1984 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1985 | coproc_init (cp); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1986 | cp->c_lock = 2; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1987 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1988 | cp->c_pid = pid; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1989 | cp->c_name = (char *)strcpy (sh_xmalloc((1 + strlen (name)), "execute_cmd.c", 1983), (name)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1990 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1991 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1992 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1993 | cp->c_lock = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1994 | return executed 22 times by 1 test: (cp);return (cp); Executed by:
executed 22 times by 1 test: return (cp); Executed by:
| 22 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1995 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1996 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1997 | static void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1998 | coproc_free (cp) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1999 | struct coproc *cp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2000 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2001 | sh_xfree((cp), "execute_cmd.c", 1995); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2002 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2003 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2004 | void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2005 | coproc_dispose (cp) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2006 | struct coproc *cp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2007 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2008 | sigset_t set, oset; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2009 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2010 | if (cp == 0
| 0-570 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2011 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2012 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2013 | do { sigemptyset (&set); sigaddset (&set, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2014 | 17 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2015 | ); sigemptyset (&oset); sigprocmask ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2016 | 0 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2017 | , &set, &oset); } while (0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2018 | cp->c_lock = 3; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2019 | coproc_unsetvars (cp); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2020 | do { if (cp->c_name
executed 21 times by 1 test: } while (0);sh_xfree((cp->c_name), "execute_cmd.c", 2010); Executed by:
| 21-549 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2021 | coproc_close (cp); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2022 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2023 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2024 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2025 | coproc_init (cp); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2026 | cp->c_lock = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2027 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2028 | sigprocmask ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2029 | 2 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2030 | , &oset, (sigset_t *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2031 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2032 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2033 | } executed 570 times by 1 test: end of block Executed by:
| 570 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2034 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2035 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2036 | void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2037 | coproc_flush () | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2038 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2039 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2040 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2041 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2042 | coproc_dispose (&sh_coproc); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2043 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2044 | } executed 550 times by 1 test: end of block Executed by:
| 550 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2045 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2046 | void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2047 | coproc_close (cp) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2048 | struct coproc *cp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2049 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2050 | if (cp->c_rfd >= 0
| 21-2802 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2051 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2052 | close (cp->c_rfd); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2053 | cp->c_rfd = -1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2054 | } executed 21 times by 1 test: end of block Executed by:
| 21 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2055 | if (cp->c_wfd >= 0
| 21-2802 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2056 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2057 | close (cp->c_wfd); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2058 | cp->c_wfd = -1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2059 | } executed 21 times by 1 test: end of block Executed by:
| 21 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2060 | cp->c_rsave = cp->c_wsave = -1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2061 | } executed 2823 times by 1 test: end of block Executed by:
| 2823 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2062 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2063 | void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2064 | coproc_closeall () | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2065 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2066 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2067 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2068 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2069 | coproc_close (&sh_coproc); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2070 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2071 | } executed 2253 times by 1 test: end of block Executed by:
| 2253 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2072 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2073 | void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2074 | coproc_reap () | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2075 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2076 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2077 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2078 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2079 | struct coproc *cp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2080 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2081 | cp = &sh_coproc; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2082 | if (cp
| 0-20808879 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2083 | coproc_dispose (cp); executed 20 times by 1 test: coproc_dispose (cp); Executed by:
| 20 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2084 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2085 | } executed 20808879 times by 1 test: end of block Executed by:
| 20808879 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2086 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2087 | void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2088 | coproc_rclose (cp, fd) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2089 | struct coproc *cp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2090 | int fd; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2091 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2092 | if (cp->c_rfd >= 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2093 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2094 | close (cp->c_rfd); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2095 | cp->c_rfd = -1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2096 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2097 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2098 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2099 | void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2100 | coproc_wclose (cp, fd) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2101 | struct coproc *cp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2102 | int fd; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2103 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2104 | if (cp->c_wfd >= 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2105 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2106 | close (cp->c_wfd); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2107 | cp->c_wfd = -1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2108 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2109 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2110 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2111 | void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2112 | coproc_checkfd (cp, fd) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2113 | struct coproc *cp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2114 | int fd; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2115 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2116 | int update; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2117 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2118 | update = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2119 | if (cp->c_rfd >= 0
| 1-666430 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2120 | update = cp->c_rfd = -1; executed 1 time by 1 test: update = cp->c_rfd = -1; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2121 | if (cp->c_wfd >= 0
| 1-666429 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2122 | update = cp->c_wfd = -1; executed 1 time by 1 test: update = cp->c_wfd = -1; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2123 | if (update
| 2-666438 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2124 | coproc_setvars (cp); executed 2 times by 1 test: coproc_setvars (cp); Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2125 | } executed 666440 times by 1 test: end of block Executed by:
| 666440 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2126 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2127 | void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2128 | coproc_fdchk (fd) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2129 | int fd; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2130 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2131 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2132 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2133 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2134 | coproc_checkfd (&sh_coproc, fd); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2135 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2136 | } executed 666440 times by 1 test: end of block Executed by:
| 666440 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2137 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2138 | void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2139 | coproc_fdclose (cp, fd) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2140 | struct coproc *cp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2141 | int fd; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2142 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2143 | coproc_rclose (cp, fd); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2144 | coproc_wclose (cp, fd); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2145 | coproc_setvars (cp); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2146 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2147 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2148 | void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2149 | coproc_fdsave (cp) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2150 | struct coproc *cp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2151 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2152 | cp->c_rsave = cp->c_rfd; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2153 | cp->c_wsave = cp->c_wfd; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2154 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2155 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2156 | void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2157 | coproc_fdrestore (cp) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2158 | struct coproc *cp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2159 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2160 | cp->c_rfd = cp->c_rsave; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2161 | cp->c_wfd = cp->c_wsave; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2162 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2163 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2164 | static void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2165 | coproc_setstatus (cp, status) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2166 | struct coproc *cp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2167 | int status; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2168 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2169 | cp->c_lock = 4; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2170 | cp->c_status = status; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2171 | cp->c_flags |= 0x02; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2172 | cp->c_flags &= ~0x01; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2173 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2174 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2175 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2176 | cp->c_lock = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2177 | } executed 20 times by 1 test: end of block Executed by:
| 20 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2178 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2179 | void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2180 | coproc_pidchk (pid, status) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2181 | pid_t pid; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2182 | int status; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2183 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2184 | struct coproc *cp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2185 | cp = getcoprocbypid (pid); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2186 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2187 | if (cp
| 20-3985811 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2188 | coproc_setstatus (cp, status); executed 20 times by 1 test: coproc_setstatus (cp, status); Executed by:
| 20 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2189 | } executed 3985831 times by 1 test: end of block Executed by:
| 3985831 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2190 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2191 | pid_t | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2192 | coproc_active () | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2193 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2194 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2195 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2196 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2197 | return never executed: ((sh_coproc.c_flags & 0x02) ? (pid_t)-1 : sh_coproc.c_pid);return ((sh_coproc.c_flags & 0x02) ? (pid_t)-1 : sh_coproc.c_pid); never executed: return ((sh_coproc.c_flags & 0x02) ? (pid_t)-1 : sh_coproc.c_pid); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2198 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2199 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2200 | void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2201 | coproc_setvars (cp) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2202 | struct coproc *cp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2203 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2204 | SHELL_VAR *v; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2205 | char *namevar, *t; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2206 | int l; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2207 | WORD_DESC w; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2208 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2209 | arrayind_t ind; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2210 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2211 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2212 | if (cp->c_name == 0
| 0-24 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2213 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2214 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2215 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2216 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2217 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2218 | w.word = cp->c_name; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2219 | w.flags = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2220 | if (check_identifier (&w, 1) == 0
| 0-24 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2221 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2222 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2223 | l = strlen (cp->c_name); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2224 | namevar = sh_xmalloc((l + 16), "execute_cmd.c", 2219); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2225 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2226 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2227 | v = find_variable (cp->c_name); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2228 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2229 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2230 | if (v == 0
| 11-13 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2231 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2232 | v = find_variable_nameref_for_create (cp->c_name, 1); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2233 | if (v == (void *)&nameref_invalid_value
| 1-12 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2234 | return; executed 1 time by 1 test: return; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2235 | if (v
| 0-7 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2236 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2237 | sh_xfree((cp->c_name), "execute_cmd.c", 2232); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2238 | cp->c_name = (char *)strcpy (sh_xmalloc((1 + strlen (((v)->value))), "execute_cmd.c", 2233), (((v)->value))); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2239 | v = make_new_array_variable (cp->c_name); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2240 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2241 | } executed 12 times by 1 test: end of block Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2242 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2243 | if (v
| 0-16 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2244 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2245 | if (((((
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2246 | err_readonly (cp->c_name); executed 6 times by 1 test: err_readonly (cp->c_name); Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2247 | return; executed 6 times by 1 test: return; Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2248 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2249 | if (v == 0
| 7-10 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2250 | v = make_new_array_variable (cp->c_name); executed 7 times by 1 test: v = make_new_array_variable (cp->c_name); Executed by:
| 7 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2251 | if (((((
| 8-9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2252 | v = convert_var_to_array (v); executed 8 times by 1 test: v = convert_var_to_array (v); Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2253 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2254 | t = itos (cp->c_rfd); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2255 | ind = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2256 | v = bind_array_variable (cp->c_name, ind, t, 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2257 | sh_xfree((t), "execute_cmd.c", 2252); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2258 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2259 | t = itos (cp->c_wfd); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2260 | ind = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2261 | v = bind_array_variable (cp->c_name, ind, t, 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2262 | sh_xfree((t), "execute_cmd.c", 2257); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2263 | sprintf (namevar, "%s_PID", cp->c_name); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2264 | t = itos (cp->c_pid); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2265 | v = bind_variable (namevar, t, 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2266 | sh_xfree((t), "execute_cmd.c", 2272); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2267 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2268 | sh_xfree((namevar), "execute_cmd.c", 2274); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2269 | } executed 17 times by 1 test: end of block Executed by:
| 17 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2270 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2271 | void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2272 | coproc_unsetvars (cp) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2273 | struct coproc *cp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2274 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2275 | int l; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2276 | char *namevar; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2277 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2278 | if (cp->c_name == 0
| 21-549 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2279 | return; executed 549 times by 1 test: return; Executed by:
| 549 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2280 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2281 | l = strlen (cp->c_name); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2282 | namevar = sh_xmalloc((l + 16), "execute_cmd.c", 2288); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2283 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2284 | sprintf (namevar, "%s_PID", cp->c_name); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2285 | unbind_variable_noref (namevar); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2286 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2287 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2288 | check_unbind_variable (cp->c_name); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2289 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2290 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2291 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2292 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2293 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2294 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2295 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2296 | sh_xfree((namevar), "execute_cmd.c", 2302); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2297 | } executed 21 times by 1 test: end of block Executed by:
| 21 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2298 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2299 | static int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2300 | execute_coproc (command, pipe_in, pipe_out, fds_to_close) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2301 | COMMAND *command; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2302 | int pipe_in, pipe_out; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2303 | struct fd_bitmap *fds_to_close; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2304 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2305 | int rpipe[2], wpipe[2], estat, invert; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2306 | pid_t coproc_pid; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2307 | Coproc *cp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2308 | char *tcmd, *p, *name; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2309 | sigset_t set, oset; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2310 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2311 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2312 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2313 | if (sh_coproc.c_pid != (pid_t)-1
| 0-34 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2314 | internal_warning ( never executed: internal_warning ( dcgettext (((void *)0), "execute_coproc: coproc [%d:%s] still exists" , 5) , sh_coproc.c_pid, sh_coproc.c_name); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2315 | dcgettext (((void *)0), never executed: internal_warning ( dcgettext (((void *)0), "execute_coproc: coproc [%d:%s] still exists" , 5) , sh_coproc.c_pid, sh_coproc.c_name); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2316 | "execute_coproc: coproc [%d:%s] still exists" never executed: internal_warning ( dcgettext (((void *)0), "execute_coproc: coproc [%d:%s] still exists" , 5) , sh_coproc.c_pid, sh_coproc.c_name); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2317 | , 5) never executed: internal_warning ( dcgettext (((void *)0), "execute_coproc: coproc [%d:%s] still exists" , 5) , sh_coproc.c_pid, sh_coproc.c_name); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2318 | , sh_coproc.c_pid, sh_coproc.c_name); never executed: internal_warning ( dcgettext (((void *)0), "execute_coproc: coproc [%d:%s] still exists" , 5) , sh_coproc.c_pid, sh_coproc.c_name); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2319 | coproc_init (&sh_coproc); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2320 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2321 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2322 | invert = (command->flags & 0x04) != 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2323 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2324 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2325 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2326 | name = expand_string_unsplit_to_string (command->value.Coproc->name, 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2327 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2328 | if (legal_identifier (name) == 0
| 4-30 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2329 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2330 | internal_error ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2331 | dcgettext (((void *)0), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2332 | "`%s': not a valid identifier" | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2333 | , 5) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2334 | , name); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2335 | return executed 4 times by 1 test: (invert ? 0 : 1);return (invert ? 0 : 1); Executed by:
executed 4 times by 1 test: return (invert ? 0 : 1); Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2336 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2337 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2338 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2339 | sh_xfree((command->value.Coproc->name), "execute_cmd.c", 2337); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2340 | command->value.Coproc->name = name; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2341 | } executed 30 times by 1 test: end of block Executed by:
| 30 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2342 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2343 | command_string_index = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2344 | tcmd = make_command_string (command); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2345 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2346 | sh_openpipe ((int *)&rpipe); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2347 | sh_openpipe ((int *)&wpipe); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2348 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2349 | do { sigemptyset (&set); sigaddset (&set, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2350 | 17 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2351 | ); sigemptyset (&oset); sigprocmask ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2352 | 0 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2353 | , &set, &oset); } while (0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2354 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2355 | coproc_pid = make_child (p = (char *)strcpy (sh_xmalloc((1 + strlen (tcmd)), "execute_cmd.c", 2349), (tcmd)), 1); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2356 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2357 | if (coproc_pid == 0
| 8-22 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2358 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2359 | close (rpipe[0]); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2360 | close (wpipe[1]); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2361 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2362 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2363 | do { if (p
executed 8 times by 1 test: } while (0);sh_xfree((p), "execute_cmd.c", 2357); Executed by:
| 0-8 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2364 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2365 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2366 | sigprocmask ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2367 | 2 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2368 | , &oset, (sigset_t *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2369 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2370 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2371 | estat = execute_in_subshell (command, 1, wpipe[0], rpipe[1], fds_to_close); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2372 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2373 | fflush ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2374 | stdout | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2375 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2376 | fflush ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2377 | stderr | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2378 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2379 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2380 | exit (estat); executed 7 times by 1 test: exit (estat); Executed by:
| 7 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2381 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2382 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2383 | close (rpipe[1]); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2384 | close (wpipe[0]); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2385 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2386 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2387 | cp = coproc_alloc (command->value.Coproc->name, coproc_pid); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2388 | cp->c_rfd = rpipe[0]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2389 | cp->c_wfd = wpipe[1]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2390 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2391 | cp->c_flags |= 0x01; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2392 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2393 | (fcntl ((cp->c_rfd), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2394 | 2 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2395 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2396 | 1 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2397 | )); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2398 | (fcntl ((cp->c_wfd), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2399 | 2 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2400 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2401 | 1 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2402 | )); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2403 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2404 | coproc_setvars (cp); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2405 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2406 | sigprocmask ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2407 | 2 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2408 | , &oset, (sigset_t *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2409 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2410 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2411 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2412 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2413 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2414 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2415 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2416 | close_pipes (pipe_in, pipe_out); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2417 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2418 | unlink_fifo_list (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2419 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2420 | stop_pipeline (1, (COMMAND *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2421 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2422 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2423 | do { if (interactive
never executed: } while (0);describe_pid (coproc_pid); | 0-22 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2424 | run_pending_traps (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2425 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2426 | return executed 22 times by 1 test: (invert ? 1 : 0);return (invert ? 1 : 0); Executed by:
executed 22 times by 1 test: return (invert ? 1 : 0); Executed by:
| 22 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2427 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2428 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2429 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2430 | static void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2431 | restore_stdin (s) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2432 | int s; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2433 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2434 | dup2 (s, 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2435 | close (s); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2436 | } executed 145 times by 1 test: end of block Executed by:
| 145 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2437 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2438 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2439 | static void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2440 | lastpipe_cleanup (s) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2441 | int s; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2442 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2443 | unfreeze_jobs_list (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2444 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2445 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2446 | static int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2447 | execute_pipeline (command, asynchronous, pipe_in, pipe_out, fds_to_close) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2448 | COMMAND *command; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2449 | int asynchronous, pipe_in, pipe_out; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2450 | struct fd_bitmap *fds_to_close; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2451 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2452 | int prev, fildes[2], new_bitmap_size, dummyfd, ignore_return, exec_result; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2453 | int lstdin, lastpipe_flag, lastpipe_jid; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2454 | COMMAND *cmd; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2455 | struct fd_bitmap *fd_bitmap; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2456 | pid_t lastpid; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2457 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2458 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2459 | sigset_t set, oset; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2460 | do { sigemptyset (&set); sigaddset (&set, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2461 | 17 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2462 | ); sigemptyset (&oset); sigprocmask ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2463 | 0 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2464 | , &set, &oset); } while (0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2465 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2466 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2467 | ignore_return = (command->flags & 0x08) != 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2468 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2469 | prev = pipe_in; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2470 | cmd = command; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2471 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2472 | while (cmd
| 0-27434 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2473 | cmd->value.Connection
| 0-14395 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2474 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2475 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2476 | if (pipe (fildes) < 0
| 0-14395 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2477 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2478 | sys_error ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2479 | dcgettext (((void *)0), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2480 | "pipe error" | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2481 | , 5) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2482 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2483 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2484 | terminate_current_pipeline (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2485 | kill_current_pipeline (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2486 | sigprocmask ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2487 | 2 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2488 | , &oset, (sigset_t *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2489 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2490 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2491 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2492 | last_command_exit_value = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2493 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2494 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2495 | throw_to_top_level (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2496 | return never executed: (1);return (1); never executed: return (1); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2497 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2498 | new_bitmap_size = (
| 0-14395 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2499 | ? fds_to_close->size | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2500 | : fildes[0] + 8; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2501 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2502 | fd_bitmap = new_fd_bitmap (new_bitmap_size); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2503 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2504 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2505 | xbcopy ((char *)fds_to_close->bitmap, (char *)fd_bitmap->bitmap, fds_to_close->size); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2506 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2507 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2508 | fd_bitmap->bitmap[fildes[0]] = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2509 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2510 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2511 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2512 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2513 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2514 | begin_unwind_frame ("pipe-file-descriptors"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2515 | add_unwind_protect (dispose_fd_bitmap, fd_bitmap); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2516 | add_unwind_protect (close_fd_bitmap, fd_bitmap); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2517 | if (prev >= 0
| 330-14065 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2518 | add_unwind_protect (close, prev); executed 330 times by 1 test: add_unwind_protect (close, prev); Executed by:
| 330 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2519 | dummyfd = fildes[1]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2520 | add_unwind_protect (close, dummyfd); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2521 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2522 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2523 | add_unwind_protect (restore_signal_mask, &oset); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2524 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2525 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2526 | if (ignore_return
| 0-14378 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2527 | cmd->value.Connection->first->flags |= 0x08; executed 17 times by 1 test: cmd->value.Connection->first->flags |= 0x08; Executed by:
| 17 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2528 | execute_command_internal (cmd->value.Connection->first, asynchronous, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2529 | prev, fildes[1], fd_bitmap); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2530 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2531 | if (prev >= 0
| 318-13051 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2532 | close (prev); executed 318 times by 1 test: close (prev); Executed by:
| 318 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2533 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2534 | prev = fildes[0]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2535 | close (fildes[1]); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2536 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2537 | dispose_fd_bitmap (fd_bitmap); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2538 | discard_unwind_frame ("pipe-file-descriptors"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2539 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2540 | cmd = cmd->value.Connection->second; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2541 | } executed 13369 times by 1 test: end of block Executed by:
| 13369 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2542 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2543 | lastpid = last_made_pid; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2544 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2545 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2546 | if (ignore_return
| 0-13025 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2547 | cmd->flags |= 0x08; executed 14 times by 1 test: cmd->flags |= 0x08; Executed by:
| 14 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2548 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2549 | lastpipe_flag = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2550 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2551 | begin_unwind_frame ("lastpipe-exec"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2552 | lstdin = -1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2553 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2554 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2555 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2556 | if (lastpipe_opt
| 0-12883 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2557 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2558 | lstdin = move_to_high_fd (0, 1, -1); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2559 | if (lstdin > 0
| 0-156 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2560 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2561 | do_piping (prev, pipe_out); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2562 | prev = -1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2563 | add_unwind_protect (restore_stdin, lstdin); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2564 | lastpipe_flag = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2565 | freeze_jobs_list (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2566 | lastpipe_jid = stop_pipeline (0, (COMMAND *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2567 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2568 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2569 | add_unwind_protect (lastpipe_cleanup, lastpipe_jid); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2570 | } executed 156 times by 1 test: end of block Executed by:
| 156 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2571 | if (cmd
| 0-156 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2572 | cmd->flags |= 0x2000; executed 156 times by 1 test: cmd->flags |= 0x2000; Executed by:
| 156 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2573 | } executed 156 times by 1 test: end of block Executed by:
| 156 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2574 | if (prev >= 0
| 156-12883 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2575 | add_unwind_protect (close, prev); executed 12883 times by 1 test: add_unwind_protect (close, prev); Executed by:
| 12883 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2576 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2577 | exec_result = execute_command_internal (cmd, asynchronous, prev, pipe_out, fds_to_close); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2578 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2579 | if (lstdin > 0
| 145-11955 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2580 | restore_stdin (lstdin); executed 145 times by 1 test: restore_stdin (lstdin); Executed by:
| 145 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2581 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2582 | if (prev >= 0
| 145-11955 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2583 | close (prev); executed 11955 times by 1 test: close (prev); Executed by:
| 11955 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2584 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2585 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2586 | sigprocmask ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2587 | 2 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2588 | , &oset, (sigset_t *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2589 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2590 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2591 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2592 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2593 | do { if (terminating_signal
never executed: if (interrupt_statetermsig_handler (terminating_signal);
never executed: } while (0);throw_to_top_level (); | 0-12100 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2594 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2595 | if (lastpipe_flag
| 145-11955 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2596 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2597 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2598 | if (((
| 0-145 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2599 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2600 | append_process ((char *)strcpy (sh_xmalloc((1 + strlen (the_printed_command_except_trap)), "execute_cmd.c", 2569), (the_printed_command_except_trap)), dollar_dollar_pid, exec_result, lastpipe_jid); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2601 | lstdin = wait_for (lastpid); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2602 | } executed 136 times by 1 test: end of block Executed by:
| 136 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2603 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2604 | lstdin = wait_for_single_pid (lastpid, 0); executed 9 times by 1 test: lstdin = wait_for_single_pid (lastpid, 0); Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2605 | if (((
| 0-145 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2606 | exec_result = job_exit_status (lastpipe_jid); executed 102 times by 1 test: exec_result = job_exit_status (lastpipe_jid); Executed by:
| 102 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2607 | else if (pipefail_opt
| 0-43 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2608 | exec_result = exec_result | lstdin; never executed: exec_result = exec_result | lstdin; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2609 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2610 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2611 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2612 | unfreeze_jobs_list (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2613 | } executed 145 times by 1 test: end of block Executed by:
| 145 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2614 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2615 | discard_unwind_frame ("lastpipe-exec"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2616 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2617 | return executed 12100 times by 1 test: (exec_result);return (exec_result); Executed by:
executed 12100 times by 1 test: return (exec_result); Executed by:
| 12100 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2618 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2619 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2620 | static int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2621 | execute_connection (command, asynchronous, pipe_in, pipe_out, fds_to_close) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2622 | COMMAND *command; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2623 | int asynchronous, pipe_in, pipe_out; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2624 | struct fd_bitmap *fds_to_close; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2625 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2626 | COMMAND *tc, *second; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2627 | int ignore_return, exec_result, was_error_trap, invert; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2628 | volatile int save_line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2629 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2630 | ignore_return = (command->flags & 0x08) != 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2631 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2632 | switch (command->value.Connection->connector) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2633 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2634 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2635 | case executed 217 times by 1 test: '&':case '&': Executed by:
executed 217 times by 1 test: case '&': Executed by:
| 217 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2636 | tc = command->value.Connection->first; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2637 | if (tc == 0
| 0-217 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2638 | return never executed: (0);return (0); never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2639 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2640 | if (ignore_return
| 0-217 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2641 | tc->flags |= 0x08; never executed: tc->flags |= 0x08; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2642 | tc->flags |= 0x200; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2643 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2644 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2645 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2646 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2647 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2648 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2649 | if ((subshell_environment
| 21-196 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2650 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2651 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2652 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2653 | tc->flags |= 0x400; executed 117 times by 1 test: tc->flags |= 0x400; Executed by:
| 117 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2654 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2655 | exec_result = execute_command_internal (tc, 1, pipe_in, pipe_out, fds_to_close); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2656 | do { if (terminating_signal
never executed: if (interrupt_statetermsig_handler (terminating_signal);
never executed: } while (0);throw_to_top_level (); | 0-194 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2657 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2658 | if (tc->flags & 0x400
| 90-104 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2659 | tc->flags &= ~0x400; executed 104 times by 1 test: tc->flags &= ~0x400; Executed by:
| 104 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2660 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2661 | second = command->value.Connection->second; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2662 | if (second
| 76-118 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2663 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2664 | if (ignore_return
| 0-76 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2665 | second->flags |= 0x08; never executed: second->flags |= 0x08; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2666 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2667 | exec_result = execute_command_internal (second, asynchronous, pipe_in, pipe_out, fds_to_close); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2668 | } executed 75 times by 1 test: end of block Executed by:
| 75 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2669 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2670 | break; executed 193 times by 1 test: break; Executed by:
| 193 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2671 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2672 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2673 | case executed 62099323 times by 1 test: ';':case ';': Executed by:
executed 62099323 times by 1 test: case ';': Executed by:
| 62099323 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2674 | if (ignore_return
| 72-62099251 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2675 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2676 | if (command->value.Connection->first
| 0-72 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2677 | command->value.Connection->first->flags |= 0x08; executed 72 times by 1 test: command->value.Connection->first->flags |= 0x08; Executed by:
| 72 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2678 | if (command->value.Connection->second
| 0-72 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2679 | command->value.Connection->second->flags |= 0x08; executed 72 times by 1 test: command->value.Connection->second->flags |= 0x08; Executed by:
| 72 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2680 | } executed 72 times by 1 test: end of block Executed by:
| 72 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2681 | executing_list++; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2682 | do { if (terminating_signal
never executed: if (interrupt_statetermsig_handler (terminating_signal);
never executed: } while (0);throw_to_top_level (); | 0-62099323 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2683 | execute_command (command->value.Connection->first); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2684 | do { if (terminating_signal
never executed: if (interrupt_statetermsig_handler (terminating_signal);
never executed: } while (0);throw_to_top_level (); | 0-62087607 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2685 | exec_result = execute_command_internal (command->value.Connection->second, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2686 | asynchronous, pipe_in, pipe_out, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2687 | fds_to_close); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2688 | executing_list--; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2689 | break; executed 62071014 times by 1 test: break; Executed by:
| 62071014 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2690 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2691 | case executed 14065 times by 1 test: '|':case '|': Executed by:
executed 14065 times by 1 test: case '|': Executed by:
| 14065 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2692 | was_error_trap = signal_is_trapped (
| 3-14062 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2693 | 65
| 3-14062 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2694 | +1)
| 0-14062 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2695 | 65
| 0-3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2696 | +1) == 0
| 0-3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2697 | invert = (command->flags & 0x04) != 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2698 | ignore_return = (command->flags & 0x08) != 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2699 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2700 | line_number_for_err_trap = line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2701 | exec_result = execute_pipeline (command, asynchronous, pipe_in, pipe_out, fds_to_close); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2702 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2703 | if (asynchronous
| 2-12098 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2704 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2705 | exec_result = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2706 | invert = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2707 | } executed 2 times by 1 test: end of block Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2708 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2709 | if (was_error_trap
| 0-12099 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2710 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2711 | last_command_exit_value = exec_result; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2712 | save_line_number = line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2713 | line_number = line_number_for_err_trap; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2714 | run_error_trap (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2715 | line_number = save_line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2716 | } executed 1 time by 1 test: end of block Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2717 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2718 | if (ignore_return == 0
| 3-12087 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2719 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2720 | last_command_exit_value = exec_result; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2721 | run_pending_traps (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2722 | jump_to_top_level (4); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2723 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2724 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2725 | break; executed 12097 times by 1 test: break; Executed by:
| 12097 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2726 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2727 | case executed 698 times by 1 test: 288:case 288: Executed by:
executed 698 times by 1 test: case 288: Executed by:
| 698 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2728 | case executed 5545 times by 1 test: 289:case 289: Executed by:
executed 5545 times by 1 test: case 289: Executed by:
| 5545 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2729 | if (asynchronous
| 0-6243 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2730 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2731 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2732 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2733 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2734 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2735 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2736 | command->flags |= 0x02; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2737 | exec_result = execute_command_internal (command, 1, pipe_in, pipe_out, fds_to_close); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2738 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2739 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2740 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2741 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2742 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2743 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2744 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2745 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2746 | executing_list++; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2747 | if (command->value.Connection->first
| 0-6243 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2748 | command->value.Connection->first->flags |= 0x08; executed 6243 times by 1 test: command->value.Connection->first->flags |= 0x08; Executed by:
| 6243 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2749 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2750 | exec_result = execute_command (command->value.Connection->first); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2751 | do { if (terminating_signal
never executed: if (interrupt_statetermsig_handler (terminating_signal);
never executed: } while (0);throw_to_top_level (); | 0-6184 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2752 | if (((
| 694-5490 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2753 | (
| 255-439 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2754 | ((
| 255-5490 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2755 | (
| 163-5327 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2756 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2757 | second = command->value.Connection->second; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2758 | if (ignore_return
| 0-555 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2759 | second->flags |= 0x08; executed 47 times by 1 test: second->flags |= 0x08; Executed by:
| 47 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2760 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2761 | exec_result = execute_command (second); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2762 | } executed 589 times by 1 test: end of block Executed by:
| 589 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2763 | executing_list--; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2764 | break; executed 6171 times by 1 test: break; Executed by:
| 6171 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2765 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2766 | default never executed: :default: never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2767 | command_error ("execute_connection", 2, command->value.Connection->connector, 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2768 | jump_to_top_level (2); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2769 | exec_result = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2770 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2771 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2772 | return executed 62089475 times by 1 test: exec_result;return exec_result; Executed by:
executed 62089475 times by 1 test: return exec_result; Executed by:
| 62089475 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2773 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2774 | static int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2775 | execute_for_command (for_command) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2776 | FOR_COM *for_command; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2777 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2778 | register WORD_LIST *releaser, *list; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2779 | SHELL_VAR *v; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2780 | char *identifier; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2781 | int retval, save_line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2782 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2783 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2784 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2785 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2786 | save_line_number = line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2787 | if (check_identifier (for_command->name, 1) == 0
| 6-2014463 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2788 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2789 | if (posixly_correct
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2790 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2791 | last_command_exit_value = 2; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2792 | jump_to_top_level (4); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2793 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2794 | return executed 6 times by 1 test: (1);return (1); Executed by:
executed 6 times by 1 test: return (1); Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2795 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2796 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2797 | loop_level++; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2798 | identifier = for_command->name->word; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2799 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2800 | line_number = for_command->line; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2801 | list = releaser = expand_words_no_vars (for_command->map_list); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2802 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2803 | begin_unwind_frame ("for"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2804 | add_unwind_protect (dispose_words, releaser); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2805 | if (for_command->flags & 0x08
| 0-2014461 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2806 | for_command->action->flags |= 0x08; never executed: for_command->action->flags |= 0x08; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2807 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2808 | for (retval = 0; list
| 2001902-5456682 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2809 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2810 | do { if (terminating_signal
never executed: if (interrupt_statetermsig_handler (terminating_signal);
never executed: } while (0);throw_to_top_level (); | 0-5456682 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2811 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2812 | line_number = for_command->line; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2813 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2814 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2815 | command_string_index = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2816 | print_for_command_head (for_command); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2817 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2818 | if (echo_command_at_execute
| 8-5456674 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2819 | xtrace_print_for_command_head (for_command); executed 8 times by 1 test: xtrace_print_for_command_head (for_command); Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2820 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2821 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2822 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2823 | if (signal_in_progress (
| 0-5456682 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2824 | 65
| 0-5456682 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2825 | ) == 0
| 0-5456682 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2826 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2827 | do { if (the_printed_command_except_trap
executed 5456682 times by 1 test: } while (0);sh_xfree((the_printed_command_except_trap), "execute_cmd.c", 2823); Executed by:
| 0-5456682 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2828 | the_printed_command_except_trap = (char *)strcpy (sh_xmalloc((1 + strlen (the_printed_command)), "execute_cmd.c", 2824), (the_printed_command)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2829 | } executed 5456682 times by 1 test: end of block Executed by:
| 5456682 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2830 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2831 | retval = run_debug_trap (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2832 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2833 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2834 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2835 | if (debugging_mode
| 0-5456670 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2836 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2837 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2838 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2839 | this_command_name = (char *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2840 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2841 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2842 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2843 | v = find_variable_last_nameref (identifier, 1); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2844 | if (v
| 17-5444166 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2845 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2846 | if (valid_nameref_value (list->word->word, 1) == 0
| 6-11 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2847 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2848 | sh_invalidid (list->word->word); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2849 | v = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2850 | } executed 6 times by 1 test: end of block Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2851 | else if (((((
| 0-11 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2852 | err_readonly (((v)->name)); never executed: err_readonly (((v)->name)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2853 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2854 | v = bind_variable_value (v, list->word->word, 0x0010); executed 11 times by 1 test: v = bind_variable_value (v, list->word->word, 0x0010); Executed by:
| 11 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2855 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2856 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2857 | v = bind_variable (identifier, list->word->word, 0); executed 5456665 times by 1 test: v = bind_variable (identifier, list->word->word, 0); Executed by:
| 5456665 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2858 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2859 | if (v == 0
| 0-5456676 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2860 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2861 | line_number = save_line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2862 | if (v
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2863 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2864 | last_command_exit_value = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2865 | jump_to_top_level (1); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2866 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2867 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2868 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2869 | dispose_words (releaser); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2870 | discard_unwind_frame ("for"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2871 | loop_level--; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2872 | return executed 9 times by 1 test: (1);return (1); Executed by:
executed 9 times by 1 test: return (1); Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2873 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2874 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2875 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2876 | if (((
| 0-5456673 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2877 | setifs (v); never executed: setifs (v); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2878 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2879 | retval = execute_command (for_command->action); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2880 | do { if (job_control == 0
executed 5444226 times by 1 test: } while (0);reap_dead_jobs (); Executed by:
| 0-5444226 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2881 | do { if (terminating_signal
never executed: if (interrupt_statetermsig_handler (terminating_signal);
never executed: } while (0);throw_to_top_level (); | 0-5444226 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2882 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2883 | if (breaking
| 73-5444153 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2884 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2885 | breaking--; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2886 | break; executed 73 times by 1 test: break; Executed by:
| 73 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2887 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2888 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2889 | if (continuing
| 70226-5373927 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2890 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2891 | continuing--; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2892 | if (continuing
| 30-70196 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2893 | break; executed 30 times by 1 test: break; Executed by:
| 30 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2894 | } executed 70196 times by 1 test: end of block Executed by:
| 70196 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2895 | } executed 5444123 times by 1 test: end of block Executed by:
| 5444123 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2896 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2897 | loop_level--; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2898 | line_number = save_line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2899 | dispose_words (releaser); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2900 | discard_unwind_frame ("for"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2901 | return executed 2002005 times by 1 test: (retval);return (retval); Executed by:
executed 2002005 times by 1 test: return (retval); Executed by:
| 2002005 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2902 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2903 | static intmax_t | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2904 | eval_arith_for_expr (l, okp) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2905 | WORD_LIST *l; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2906 | int *okp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2907 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2908 | WORD_LIST *new; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2909 | intmax_t expresult; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2910 | int r; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2911 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2912 | new = expand_words_no_vars (l); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2913 | if (new
| 0-79313 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2914 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2915 | if (echo_command_at_execute
| 14-79299 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2916 | xtrace_print_arith_cmd (new); executed 14 times by 1 test: xtrace_print_arith_cmd (new); Executed by:
| 14 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2917 | this_command_name = "(("; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2918 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2919 | command_string_index = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2920 | print_arith_command (new); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2921 | if (signal_in_progress (
| 0-79313 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2922 | 65
| 0-79313 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2923 | ) == 0
| 0-79313 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2924 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2925 | do { if (the_printed_command_except_trap
executed 79109 times by 1 test: } while (0);sh_xfree((the_printed_command_except_trap), "execute_cmd.c", 2951); Executed by:
| 204-79109 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2926 | the_printed_command_except_trap = (char *)strcpy (sh_xmalloc((1 + strlen (the_printed_command)), "execute_cmd.c", 2952), (the_printed_command)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2927 | } executed 79313 times by 1 test: end of block Executed by:
| 79313 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2928 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2929 | r = run_debug_trap (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2930 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2931 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2932 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2933 | if (debugging_mode == 0
| 0-78845 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2934 | expresult = evalexp (new->word->word, 0x01, okp); executed 79313 times by 1 test: expresult = evalexp (new->word->word, 0x01, okp); Executed by:
| 79313 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2935 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2936 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2937 | expresult = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2938 | if (okp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2939 | * never executed: okp = 1;*okp = 1; never executed: *okp = 1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2940 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2941 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2942 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2943 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2944 | dispose_words (new); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2945 | } executed 79313 times by 1 test: end of block Executed by:
| 79313 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2946 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2947 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2948 | expresult = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2949 | if (okp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2950 | * never executed: okp = 1;*okp = 1; never executed: *okp = 1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2951 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2952 | return executed 79313 times by 1 test: (expresult);return (expresult); Executed by:
executed 79313 times by 1 test: return (expresult); Executed by:
| 79313 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2953 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2954 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2955 | static int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2956 | execute_arith_for_command (arith_for_command) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2957 | ARITH_FOR_COM *arith_for_command; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2958 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2959 | intmax_t expresult; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2960 | int expok, body_status, arith_lineno, save_lineno; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2961 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2962 | body_status = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2963 | loop_level++; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2964 | save_lineno = line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2965 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2966 | if (arith_for_command->flags & 0x08
| 0-2607 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2967 | arith_for_command->action->flags |= 0x08; never executed: arith_for_command->action->flags |= 0x08; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2968 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2969 | this_command_name = "(("; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2970 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2971 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2972 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2973 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2974 | line_number = arith_lineno = arith_for_command->line; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2975 | if (variable_context
| 0-1538 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2976 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2977 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2978 | line_number -= function_line_number - 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2979 | if (line_number <= 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2980 | line_number = 1; never executed: line_number = 1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2981 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2982 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2983 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2984 | expresult = eval_arith_for_expr (arith_for_command->init, &expok); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2985 | if (expok == 0
| 0-2607 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2986 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2987 | line_number = save_lineno; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2988 | return never executed: (1);return (1); never executed: return (1); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2989 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2990 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2991 | while (1) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2992 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2993 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2994 | line_number = arith_lineno; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2995 | expresult = eval_arith_for_expr (arith_for_command->test, &expok); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2996 | line_number = save_lineno; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2997 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2998 | if (expok == 0
| 0-39552 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2999 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3000 | body_status = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3001 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3002 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3003 | do { if (job_control == 0
executed 39552 times by 1 test: } while (0);reap_dead_jobs (); Executed by:
| 0-39552 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3004 | if (expresult == 0
| 1386-38166 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3005 | break; executed 1386 times by 1 test: break; Executed by:
| 1386 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3006 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3007 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3008 | do { if (terminating_signal
never executed: if (interrupt_statetermsig_handler (terminating_signal);
never executed: } while (0);throw_to_top_level (); | 0-38166 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3009 | body_status = execute_command (arith_for_command->action); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3010 | do { if (terminating_signal
never executed: if (interrupt_statetermsig_handler (terminating_signal);
never executed: } while (0);throw_to_top_level (); | 0-38166 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3011 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3012 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3013 | if (breaking
| 1012-37154 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3014 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3015 | breaking--; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3016 | break; executed 1012 times by 1 test: break; Executed by:
| 1012 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3017 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3018 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3019 | if (continuing
| 404-36750 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3020 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3021 | continuing--; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3022 | if (continuing
| 0-404 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3023 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3024 | } executed 404 times by 1 test: end of block Executed by:
| 404 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3025 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3026 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3027 | line_number = arith_lineno; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3028 | expresult = eval_arith_for_expr (arith_for_command->step, &expok); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3029 | line_number = save_lineno; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3030 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3031 | if (expok == 0
| 0-37154 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3032 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3033 | body_status = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3034 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3035 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3036 | } executed 37154 times by 1 test: end of block Executed by:
| 37154 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3037 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3038 | loop_level--; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3039 | line_number = save_lineno; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3040 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3041 | return executed 2398 times by 1 test: (body_status);return (body_status); Executed by:
executed 2398 times by 1 test: return (body_status); Executed by:
| 2398 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3042 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3043 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3044 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3045 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3046 | static int LINES, COLS, tabsize; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3047 | static int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3048 | displen (s) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3049 | const char *s; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3050 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3051 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3052 | wchar_t *wcstr; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3053 | size_t slen; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3054 | int wclen; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3055 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3056 | wcstr = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3057 | slen = mbstowcs (wcstr, s, 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3058 | if (slen == -1
| 0-12 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3059 | slen = 0; never executed: slen = 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3060 | wcstr = (wchar_t *)sh_xmalloc((sizeof (wchar_t) * (slen + 1)), "execute_cmd.c", 3099); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3061 | mbstowcs (wcstr, s, slen + 1); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3062 | wclen = wcswidth (wcstr, slen); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3063 | sh_xfree((wcstr), "execute_cmd.c", 3102); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3064 | return executed 12 times by 1 test: (wclen < 0 ? (((s) && (s)[0]) ? ((s)[1] ? ((s)[2] ? strlen(s) : 2) : 1) : 0) : wclen);return (wclen < 0 ? (((s) && (s)[0]) ? ((s)[1] ? ((s)[2] ? strlen(s) : 2) : 1) : 0) : wclen); Executed by:
executed 12 times by 1 test: return (wclen < 0 ? (((s) && (s)[0]) ? ((s)[1] ? ((s)[2] ? strlen(s) : 2) : 1) : 0) : wclen); Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3065 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3066 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3067 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3068 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3069 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3070 | static int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3071 | print_index_and_element (len, ind, list) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3072 | int len, ind; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3073 | WORD_LIST *list; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3074 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3075 | register WORD_LIST *l; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3076 | register int i; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3077 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3078 | if (list == 0
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3079 | return never executed: (0);return (0); never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3080 | for (i = ind, l = list; l
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3081 | ; never executed: ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3082 | if (l == 0
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3083 | return never executed: (0);return (0); never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3084 | fprintf ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3085 | stderr | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3086 | , "%*d%s%s", len, ind, ") ", l->word->word); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3087 | return executed 6 times by 1 test: (displen (l->word->word));return (displen (l->word->word)); Executed by:
executed 6 times by 1 test: return (displen (l->word->word)); Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3088 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3089 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3090 | static void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3091 | indent (from, to) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3092 | int from, to; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3093 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3094 | while (from < to
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3095 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3096 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3097 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3098 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3099 | _IO_putc ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3100 | '\t' | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3101 | , stderr) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3102 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3103 | from += tabsize - from % tabsize; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3104 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3105 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3106 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3107 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3108 | _IO_putc ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3109 | ' ' | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3110 | , stderr) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3111 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3112 | from++; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3113 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3114 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3115 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3116 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3117 | static void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3118 | print_select_list (list, list_len, max_elem_len, indices_len) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3119 | WORD_LIST *list; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3120 | int list_len, max_elem_len, indices_len; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3121 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3122 | int ind, row, elem_len, pos, cols, rows; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3123 | int first_column_indices_len, other_indices_len; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3124 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3125 | if (list == 0
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3126 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3127 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3128 | _IO_putc ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3129 | '\n' | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3130 | , stderr) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3131 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3132 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3133 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3134 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3135 | cols = max_elem_len
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3136 | if (cols == 0
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3137 | cols = 1; never executed: cols = 1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3138 | rows = list_len
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3139 | cols = list_len
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3140 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3141 | if (rows == 1
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3142 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3143 | rows = cols; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3144 | cols = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3145 | } executed 6 times by 1 test: end of block Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3146 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3147 | first_column_indices_len = ((
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3148 | other_indices_len = indices_len; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3149 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3150 | for (row = 0; row < rows
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3151 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3152 | ind = row; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3153 | pos = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3154 | while (1) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3155 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3156 | indices_len = (
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3157 | elem_len = print_index_and_element (indices_len, ind + 1, list); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3158 | elem_len += indices_len + 2; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3159 | ind += rows; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3160 | if (ind >= list_len
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3161 | break; executed 6 times by 1 test: break; Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3162 | indent (pos + elem_len, pos + max_elem_len); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3163 | pos += max_elem_len; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3164 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3165 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3166 | _IO_putc ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3167 | '\n' | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3168 | , stderr) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3169 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3170 | } executed 6 times by 1 test: end of block Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3171 | } executed 6 times by 1 test: end of block Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3172 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3173 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3174 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3175 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3176 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3177 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3178 | static char * | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3179 | select_query (list, list_len, prompt, print_menu) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3180 | WORD_LIST *list; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3181 | int list_len; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3182 | char *prompt; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3183 | int print_menu; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3184 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3185 | int max_elem_len, indices_len, len; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3186 | intmax_t reply; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3187 | WORD_LIST *l; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3188 | char *repl_string, *t; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3189 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3190 | COLS = default_columns (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3191 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3192 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3193 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3194 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3195 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3196 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3197 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3198 | tabsize = 8; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3199 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3200 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3201 | max_elem_len = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3202 | for (l = list; l
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3203 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3204 | len = displen (l->word->word); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3205 | if (len > max_elem_len
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3206 | max_elem_len = len; executed 6 times by 1 test: max_elem_len = len; Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3207 | } executed 6 times by 1 test: end of block Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3208 | indices_len = ((
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3209 | max_elem_len += indices_len + 2 + 2; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3210 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3211 | while (1) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3212 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3213 | if (print_menu
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3214 | print_select_list (list, list_len, max_elem_len, indices_len); executed 6 times by 1 test: print_select_list (list, list_len, max_elem_len, indices_len); Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3215 | fprintf ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3216 | stderr | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3217 | , "%s", prompt); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3218 | fflush ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3219 | stderr | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3220 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3221 | do { if (terminating_signal
never executed: if (interrupt_statetermsig_handler (terminating_signal);
never executed: } while (0);throw_to_top_level (); | 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3222 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3223 | if (read_builtin ((WORD_LIST *)
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3224 | ((void *)0)
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3225 | ) != 0
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3226 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3227 | putchar ('\n'); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3228 | return never executed: ((char *)return ((char *) ((void *)0) ); never executed: return ((char *) ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3229 | ((void *)0) never executed: return ((char *) ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3230 | ); never executed: return ((char *) ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3231 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3232 | repl_string = get_string_value ("REPLY"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3233 | if (repl_string == 0
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3234 | return never executed: ((char *)return ((char *) ((void *)0) ); never executed: return ((char *) ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3235 | ((void *)0) never executed: return ((char *) ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3236 | ); never executed: return ((char *) ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3237 | if (*
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3238 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3239 | print_menu = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3240 | continue; never executed: continue; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3241 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3242 | if (legal_number (repl_string, &reply) == 0
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3243 | return never executed: "";return ""; never executed: return ""; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3244 | if (reply < 1
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3245 | return never executed: "";return ""; never executed: return ""; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3246 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3247 | for (l = list; l
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3248 | ; never executed: ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3249 | return executed 6 times by 1 test: (l->word->word);return (l->word->word); Executed by:
executed 6 times by 1 test: return (l->word->word); Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3250 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3251 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3252 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3253 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3254 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3255 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3256 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3257 | static int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3258 | execute_select_command (select_command) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3259 | SELECT_COM *select_command; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3260 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3261 | WORD_LIST *releaser, *list; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3262 | SHELL_VAR *v; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3263 | char *identifier, *ps3_prompt, *selection; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3264 | int retval, list_len, show_menu, save_line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3265 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3266 | if (check_identifier (select_command->name, 1) == 0
| 0-9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3267 | return never executed: (1);return (1); never executed: return (1); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3268 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3269 | save_line_number = line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3270 | line_number = select_command->line; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3271 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3272 | command_string_index = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3273 | print_select_command_head (select_command); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3274 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3275 | if (echo_command_at_execute
| 0-9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3276 | xtrace_print_select_command_head (select_command); never executed: xtrace_print_select_command_head (select_command); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3277 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3278 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3279 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3280 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3281 | if (signal_in_progress (
| 0-9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3282 | 65
| 0-9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3283 | ) == 0
| 0-9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3284 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3285 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3286 | do { if (the_printed_command_except_trap
executed 9 times by 1 test: } while (0);sh_xfree((the_printed_command_except_trap), "execute_cmd.c", 3295); Executed by:
| 0-9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3287 | the_printed_command_except_trap = (char *)strcpy (sh_xmalloc((1 + strlen (the_printed_command)), "execute_cmd.c", 3296), (the_printed_command)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3288 | } executed 9 times by 1 test: end of block Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3289 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3290 | retval = run_debug_trap (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3291 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3292 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3293 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3294 | if (debugging_mode
| 0-9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3295 | return never executed: (0);return (0); never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3296 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3297 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3298 | loop_level++; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3299 | identifier = select_command->name->word; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3300 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3301 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3302 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3303 | list = releaser = expand_words_no_vars (select_command->map_list); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3304 | list_len = list_length (list); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3305 | if (list == 0
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3306 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3307 | if (list
| 0-3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3308 | dispose_words (list); never executed: dispose_words (list); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3309 | line_number = save_line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3310 | return executed 3 times by 1 test: (0);return (0); Executed by:
executed 3 times by 1 test: return (0); Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3311 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3312 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3313 | begin_unwind_frame ("select"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3314 | add_unwind_protect (dispose_words, releaser); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3315 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3316 | if (select_command->flags & 0x08
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3317 | select_command->action->flags |= 0x08; never executed: select_command->action->flags |= 0x08; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3318 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3319 | retval = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3320 | show_menu = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3321 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3322 | while (1) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3323 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3324 | line_number = select_command->line; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3325 | ps3_prompt = get_string_value ("PS3"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3326 | if (ps3_prompt == 0
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3327 | ps3_prompt = "#? "; executed 6 times by 1 test: ps3_prompt = "#? "; Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3328 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3329 | do { if (terminating_signal
never executed: if (interrupt_statetermsig_handler (terminating_signal);
never executed: } while (0);throw_to_top_level (); | 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3330 | selection = select_query (list, list_len, ps3_prompt, show_menu); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3331 | do { if (terminating_signal
never executed: if (interrupt_statetermsig_handler (terminating_signal);
never executed: } while (0);throw_to_top_level (); | 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3332 | if (selection == 0
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3333 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3334 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3335 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3336 | retval = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3337 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3338 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3339 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3340 | v = bind_variable (identifier, selection, 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3341 | if (v == 0
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3342 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3343 | if (v
| 0-6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3344 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3345 | last_command_exit_value = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3346 | jump_to_top_level (1); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3347 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3348 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3349 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3350 | dispose_words (releaser); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3351 | discard_unwind_frame ("select"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3352 | loop_level--; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3353 | line_number = save_line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3354 | return executed 6 times by 1 test: (1);return (1); Executed by:
executed 6 times by 1 test: return (1); Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3355 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3356 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3357 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3358 | retval = execute_command (select_command->action); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3359 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3360 | do { if (job_control == 0
never executed: } while (0);reap_dead_jobs (); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3361 | do { if (terminating_signal
never executed: if (interrupt_statetermsig_handler (terminating_signal);
never executed: } while (0);throw_to_top_level (); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3362 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3363 | if (breaking
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3364 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3365 | breaking--; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3366 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3367 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3368 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3369 | if (continuing
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3370 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3371 | continuing--; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3372 | if (continuing
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3373 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3374 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3375 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3376 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3377 | show_menu = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3378 | selection = get_string_value ("REPLY"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3379 | if (selection
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3380 | show_menu = 1; never executed: show_menu = 1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3381 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3382 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3383 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3384 | loop_level--; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3385 | line_number = save_line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3386 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3387 | dispose_words (releaser); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3388 | discard_unwind_frame ("select"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3389 | return never executed: (retval);return (retval); never executed: return (retval); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3390 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3391 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3392 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3393 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3394 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3395 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3396 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3397 | static int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3398 | execute_case_command (case_command) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3399 | CASE_COM *case_command; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3400 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3401 | register WORD_LIST *list; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3402 | WORD_LIST *wlist, *es; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3403 | PATTERN_LIST *clauses; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3404 | char *word, *pattern; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3405 | int retval, match, ignore_return, save_line_number, qflags; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3406 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3407 | save_line_number = line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3408 | line_number = case_command->line; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3409 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3410 | command_string_index = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3411 | print_case_command_head (case_command); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3412 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3413 | if (echo_command_at_execute
| 1-36947170 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3414 | xtrace_print_case_command_head (case_command); executed 1 time by 1 test: xtrace_print_case_command_head (case_command); Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3415 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3416 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3417 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3418 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3419 | if (signal_in_progress (
| 0-36947171 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3420 | 65
| 0-36947171 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3421 | ) == 0
| 0-36947171 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3422 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3423 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3424 | do { if (the_printed_command_except_trap
executed 36947167 times by 1 test: } while (0);sh_xfree((the_printed_command_except_trap), "execute_cmd.c", 3431); Executed by:
| 4-36947167 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3425 | the_printed_command_except_trap = (char *)strcpy (sh_xmalloc((1 + strlen (the_printed_command)), "execute_cmd.c", 3432), (the_printed_command)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3426 | } executed 36947171 times by 1 test: end of block Executed by:
| 36947171 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3427 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3428 | retval = run_debug_trap(); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3429 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3430 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3431 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3432 | if (debugging_mode
| 0-36947169 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3433 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3434 | line_number = save_line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3435 | return never executed: (0);return (0); never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3436 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3437 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3438 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3439 | wlist = expand_word_unsplit (case_command->word, 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3440 | word = wlist
| 3377723-33569440 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3441 | dispose_words (wlist); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3442 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3443 | retval = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3444 | ignore_return = case_command->flags & 0x08; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3445 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3446 | begin_unwind_frame ("case"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3447 | add_unwind_protect (xfree, word); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3448 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3449 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3450 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3451 | for (clauses = case_command->clauses; clauses
| 9260214-46492281 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3452 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3453 | do { if (terminating_signal
never executed: if (interrupt_statetermsig_handler (terminating_signal);
never executed: } while (0);throw_to_top_level (); | 0-46492281 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3454 | for (list = clauses->patterns; list
| 18805330-46853983 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3455 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3456 | es = expand_word_leave_quoted (list->word, 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3457 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3458 | if (es
| 0-46853982 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3459 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3460 | qflags = 0x01; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3461 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3462 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3463 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3464 | if ((
| 19831894-27022088 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3465 | qflags |= 0x08; executed 27022088 times by 1 test: qflags |= 0x08; Executed by:
| 27022088 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3466 | pattern = quote_string_for_globbing (es->word->word, qflags); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3467 | } executed 46853982 times by 1 test: end of block Executed by:
| 46853982 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3468 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3469 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3470 | pattern = (char *)sh_xmalloc((1), "execute_cmd.c", 3477); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3471 | pattern[0] = '\0'; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3472 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3473 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3474 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3475 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3476 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3477 | match = strmatch (pattern, word, (extended_glob ? (1 << 5) : 0)|(match_ignore_case ? (1 << 4) : 0)) != 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3478 | sh_xfree((pattern), "execute_cmd.c", 3485); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3479 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3480 | dispose_words (es); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3481 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3482 | if (match
| 19167032-27686950 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3483 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3484 | do | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3485 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3486 | if (clauses->action
| 0-24313526 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3487 | clauses->action->flags |= 0x08; never executed: clauses->action->flags |= 0x08; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3488 | retval = execute_command (clauses->action); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3489 | } executed 27680091 times by 1 test: end of block Executed by:
| 27680091 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3490 | while ((
| 1-27680087 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3491 | if (clauses == 0
| 1-27680087 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3492 | goto executed 27680086 times by 1 test: exit_case_command;goto exit_case_command; Executed by:
executed 27680086 times by 1 test: goto exit_case_command; Executed by:
| 27680086 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3493 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3494 | break; executed 2 times by 1 test: break; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3495 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3496 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3497 | do { if (terminating_signal
never executed: if (interrupt_statetermsig_handler (terminating_signal);
never executed: } while (0);throw_to_top_level (); | 0-19167032 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3498 | } executed 19167032 times by 1 test: end of block Executed by:
| 19167032 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3499 | } executed 18805332 times by 1 test: end of block Executed by:
| 18805332 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3500 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3501 | exit_case_command: code before this statement executed 9260214 times by 1 test: exit_case_command: Executed by:
| 9260214 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3502 | sh_xfree((word), "execute_cmd.c", 3509); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3503 | discard_unwind_frame ("case"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3504 | line_number = save_line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3505 | return executed 36940300 times by 1 test: (retval);return (retval); Executed by:
executed 36940300 times by 1 test: return (retval); Executed by:
| 36940300 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3506 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3507 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3508 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3509 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3510 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3511 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3512 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3513 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3514 | static int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3515 | execute_while_command (while_command) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3516 | WHILE_COM *while_command; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3517 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3518 | return executed 3891252 times by 1 test: (execute_while_or_until (while_command, 0));return (execute_while_or_until (while_command, 0)); Executed by:
executed 3891252 times by 1 test: return (execute_while_or_until (while_command, 0)); Executed by:
| 3891252 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3519 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3520 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3521 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3522 | static int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3523 | execute_until_command (while_command) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3524 | WHILE_COM *while_command; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3525 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3526 | return executed 12 times by 1 test: (execute_while_or_until (while_command, 1));return (execute_while_or_until (while_command, 1)); Executed by:
executed 12 times by 1 test: return (execute_while_or_until (while_command, 1)); Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3527 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3528 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3529 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3530 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3531 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3532 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3533 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3534 | static int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3535 | execute_while_or_until (while_command, type) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3536 | WHILE_COM *while_command; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3537 | int type; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3538 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3539 | int return_value, body_status; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3540 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3541 | body_status = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3542 | loop_level++; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3543 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3544 | while_command->test->flags |= 0x08; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3545 | if (while_command->flags & 0x08
| 0-3891264 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3546 | while_command->action->flags |= 0x08; never executed: while_command->action->flags |= 0x08; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3547 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3548 | while (1) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3549 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3550 | return_value = execute_command (while_command->test); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3551 | do { if (job_control == 0
executed 13823981 times by 1 test: } while (0);reap_dead_jobs (); Executed by:
| 0-13823981 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3552 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3553 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3554 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3555 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3556 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3557 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3558 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3559 | if (type == 0
| 20-13823961 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3560 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3561 | if (breaking
| 0-660707 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3562 | breaking--; never executed: breaking--; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3563 | if (continuing
| 0-660707 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3564 | continuing--; never executed: continuing--; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3565 | break; executed 660707 times by 1 test: break; Executed by:
| 660707 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3566 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3567 | if (type == 1
| 9-13163254 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3568 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3569 | if (breaking
| 0-9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3570 | breaking--; never executed: breaking--; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3571 | if (continuing
| 0-9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3572 | continuing--; never executed: continuing--; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3573 | break; executed 9 times by 1 test: break; Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3574 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3575 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3576 | do { if (terminating_signal
never executed: if (interrupt_statetermsig_handler (terminating_signal);
never executed: } while (0);throw_to_top_level (); | 0-13163265 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3577 | body_status = execute_command (while_command->action); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3578 | do { if (terminating_signal
never executed: if (interrupt_statetermsig_handler (terminating_signal);
never executed: } while (0);throw_to_top_level (); | 0-13161896 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3579 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3580 | if (breaking
| 3229179-9932717 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3581 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3582 | breaking--; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3583 | break; executed 3229179 times by 1 test: break; Executed by:
| 3229179 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3584 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3585 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3586 | if (continuing
| 3-9932714 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3587 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3588 | continuing--; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3589 | if (continuing
| 0-3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3590 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3591 | } executed 3 times by 1 test: end of block Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3592 | } executed 9932717 times by 1 test: end of block Executed by:
| 9932717 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3593 | loop_level--; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3594 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3595 | return executed 3889895 times by 1 test: (body_status);return (body_status); Executed by:
executed 3889895 times by 1 test: return (body_status); Executed by:
| 3889895 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3596 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3597 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3598 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3599 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3600 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3601 | static int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3602 | execute_if_command (if_command) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3603 | IF_COM *if_command; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3604 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3605 | int return_value, save_line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3606 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3607 | save_line_number = line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3608 | if_command->test->flags |= 0x08; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3609 | return_value = execute_command (if_command->test); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3610 | line_number = save_line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3611 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3612 | if (return_value == 0
| 2981-5255 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3613 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3614 | do { if (terminating_signal
never executed: if (interrupt_statetermsig_handler (terminating_signal);
never executed: } while (0);throw_to_top_level (); | 0-2981 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3615 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3616 | if (if_command->true_case
| 0-2981 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3617 | if_command->true_case->flags |= 0x08; never executed: if_command->true_case->flags |= 0x08; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3618 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3619 | return executed 2981 times by 1 test: (execute_command (if_command->true_case));return (execute_command (if_command->true_case)); Executed by:
executed 2981 times by 1 test: return (execute_command (if_command->true_case)); Executed by:
| 2981 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3620 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3621 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3622 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3623 | do { if (terminating_signal
never executed: if (interrupt_statetermsig_handler (terminating_signal);
never executed: } while (0);throw_to_top_level (); | 0-5255 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3624 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3625 | if (if_command->false_case
| 0-5180 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3626 | if_command->false_case->flags |= 0x08; never executed: if_command->false_case->flags |= 0x08; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3627 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3628 | return executed 5255 times by 1 test: (execute_command (if_command->false_case));return (execute_command (if_command->false_case)); Executed by:
executed 5255 times by 1 test: return (execute_command (if_command->false_case)); Executed by:
| 5255 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3629 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3630 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3631 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3632 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3633 | static int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3634 | execute_arith_command (arith_command) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3635 | ARITH_COM *arith_command; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3636 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3637 | int expok, save_line_number, retval; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3638 | intmax_t expresult; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3639 | WORD_LIST *new; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3640 | char *exp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3641 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3642 | expresult = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3643 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3644 | save_line_number = line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3645 | this_command_name = "(("; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3646 | line_number_for_err_trap = line_number = arith_command->line; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3647 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3648 | if (variable_context
| 0-6461580 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3649 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3650 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3651 | line_number -= function_line_number - 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3652 | if (line_number <= 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3653 | line_number = 1; never executed: line_number = 1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3654 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3655 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3656 | command_string_index = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3657 | print_arith_command (arith_command->exp); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3658 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3659 | if (signal_in_progress (
| 0-6476018 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3660 | 65
| 0-6476018 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3661 | ) == 0
| 0-6476018 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3662 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3663 | do { if (the_printed_command_except_trap
executed 6476017 times by 1 test: } while (0);sh_xfree((the_printed_command_except_trap), "execute_cmd.c", 3668); Executed by:
| 1-6476017 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3664 | the_printed_command_except_trap = (char *)strcpy (sh_xmalloc((1 + strlen (the_printed_command)), "execute_cmd.c", 3669), (the_printed_command)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3665 | } executed 6476018 times by 1 test: end of block Executed by:
| 6476018 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3666 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3667 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3668 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3669 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3670 | retval = run_debug_trap (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3671 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3672 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3673 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3674 | if (debugging_mode
| 0-6476014 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3675 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3676 | line_number = save_line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3677 | return never executed: (0);return (0); never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3678 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3679 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3680 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3681 | new = expand_words_no_vars (arith_command->exp); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3682 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3683 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3684 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3685 | if (echo_command_at_execute
| 0-6476018 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3686 | xtrace_print_arith_cmd (new); never executed: xtrace_print_arith_cmd (new); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3687 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3688 | if (new
| 7-6476011 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3689 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3690 | exp = new->
| 0-6476011 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3691 | expresult = evalexp (exp, 0x01, &expok); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3692 | line_number = save_line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3693 | if (exp != new->word->word
| 0-6476010 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3694 | sh_xfree((exp), "execute_cmd.c", 3699); never executed: sh_xfree((exp), "execute_cmd.c", 3699); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3695 | dispose_words (new); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3696 | } executed 6476010 times by 1 test: end of block Executed by:
| 6476010 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3697 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3698 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3699 | expresult = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3700 | expok = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3701 | } executed 7 times by 1 test: end of block Executed by:
| 7 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3702 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3703 | if (expok == 0
| 12-6476005 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3704 | return executed 12 times by 1 test: (1);return (1); Executed by:
executed 12 times by 1 test: return (1); Executed by:
| 12 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3705 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3706 | return executed 6476005 times by 1 test: (expresult == 0 ? 1 : 0);return (expresult == 0 ? 1 : 0); Executed by:
executed 6476005 times by 1 test: return (expresult == 0 ? 1 : 0); Executed by:
| 6476005 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3707 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3708 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3709 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3710 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3711 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3712 | static char * const nullstr = ""; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3713 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3714 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3715 | static int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3716 | execute_cond_node (cond) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3717 | COND_COM *cond; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3718 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3719 | int result, invert, patmatch, rmatch, mflags, ignore; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3720 | char *arg1, *arg2; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3721 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3722 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3723 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3724 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3725 | invert = (cond->flags & 0x04); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3726 | ignore = (cond->flags & 0x08); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3727 | if (ignore
| 168-998 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3728 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3729 | if (cond->left
| 0-998 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3730 | cond->left->flags |= 0x08; executed 998 times by 1 test: cond->left->flags |= 0x08; Executed by:
| 998 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3731 | if (cond->right
| 235-763 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3732 | cond->right->flags |= 0x08; executed 763 times by 1 test: cond->right->flags |= 0x08; Executed by:
| 763 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3733 | } executed 998 times by 1 test: end of block Executed by:
| 998 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3734 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3735 | if (cond->type == 6
| 141-1025 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3736 | result = execute_cond_node (cond->left); executed 141 times by 1 test: result = execute_cond_node (cond->left); Executed by:
| 141 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3737 | else if (cond->type == 2
| 77-948 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3738 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3739 | result = execute_cond_node (cond->left); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3740 | if (result != 0
| 5-72 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3741 | result = execute_cond_node (cond->right); executed 72 times by 1 test: result = execute_cond_node (cond->right); Executed by:
| 72 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3742 | } executed 77 times by 1 test: end of block Executed by:
| 77 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3743 | else if (cond->type == 1
| 158-790 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3744 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3745 | result = execute_cond_node (cond->left); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3746 | if (result == 0
| 70-88 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3747 | result = execute_cond_node (cond->right); executed 88 times by 1 test: result = execute_cond_node (cond->right); Executed by:
| 88 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3748 | } executed 158 times by 1 test: end of block Executed by:
| 158 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3749 | else if (cond->type == 3
| 120-670 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3750 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3751 | if (ignore
| 23-97 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3752 | comsub_ignore_return++; executed 97 times by 1 test: comsub_ignore_return++; Executed by:
| 97 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3753 | arg1 = cond_expand_word (cond->left->op, 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3754 | if (ignore
| 23-97 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3755 | comsub_ignore_return--; executed 97 times by 1 test: comsub_ignore_return--; Executed by:
| 97 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3756 | if (arg1 == 0
| 9-111 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3757 | arg1 = nullstr; executed 9 times by 1 test: arg1 = nullstr; Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3758 | if (echo_command_at_execute
| 0-120 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3759 | xtrace_print_cond_term (cond->type, invert, cond->op, arg1, (char *) never executed: xtrace_print_cond_term (cond->type, invert, cond->op, arg1, (char *) ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3760 | ((void *)0) never executed: xtrace_print_cond_term (cond->type, invert, cond->op, arg1, (char *) ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3761 | ); never executed: xtrace_print_cond_term (cond->type, invert, cond->op, arg1, (char *) ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3762 | result = unary_test (cond->op->word, arg1)
| 20-100 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3763 | if (arg1 != nullstr
| 9-111 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3764 | sh_xfree((arg1), "execute_cmd.c", 3767); executed 111 times by 1 test: sh_xfree((arg1), "execute_cmd.c", 3767); Executed by:
| 111 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3765 | } executed 120 times by 1 test: end of block Executed by:
| 120 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3766 | else if (cond->type == 4
| 0-670 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3767 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3768 | rmatch = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3769 | patmatch = (((
| 0-566 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3770 | (cond->op->word[0] == '!'
| 0-73 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3771 | (cond->op->word[0] == '='
| 89-407 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3772 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3773 | rmatch = (cond->op->word[0] == '='
| 89-480 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3774 | cond->op->word[2] == '\0'
| 0-89 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3775 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3776 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3777 | if (ignore
| 129-541 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3778 | comsub_ignore_return++; executed 541 times by 1 test: comsub_ignore_return++; Executed by:
| 541 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3779 | arg1 = cond_expand_word (cond->left->op, 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3780 | if (ignore
| 129-541 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3781 | comsub_ignore_return--; executed 541 times by 1 test: comsub_ignore_return--; Executed by:
| 541 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3782 | if (arg1 == 0
| 80-590 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3783 | arg1 = nullstr; executed 80 times by 1 test: arg1 = nullstr; Executed by:
| 80 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3784 | if (ignore
| 129-541 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3785 | comsub_ignore_return++; executed 541 times by 1 test: comsub_ignore_return++; Executed by:
| 541 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3786 | arg2 = cond_expand_word (cond->right->op, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3787 | (rmatch && shell_compatibility_level > 31) ? 2 : (patmatch ? 1 : 0)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3788 | if (ignore
| 129-540 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3789 | comsub_ignore_return--; executed 540 times by 1 test: comsub_ignore_return--; Executed by:
| 540 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3790 | if (arg2 == 0
| 3-666 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3791 | arg2 = nullstr; executed 3 times by 1 test: arg2 = nullstr; Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3792 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3793 | if (echo_command_at_execute
| 0-669 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3794 | xtrace_print_cond_term (cond->type, invert, cond->op, arg1, arg2); never executed: xtrace_print_cond_term (cond->type, invert, cond->op, arg1, arg2); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3795 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3796 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3797 | if (rmatch
| 89-580 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3798 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3799 | mflags = 0x002; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3800 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3801 | mflags |= 0x001; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3802 | result = sh_regmatch (arg1, arg2, mflags); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3803 | } executed 89 times by 1 test: end of block Executed by:
| 89 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3804 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3805 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3806 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3807 | int oe; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3808 | oe = extended_glob; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3809 | extended_glob = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3810 | result = binary_test (cond->op->word, arg1, arg2, 0x01|0x02|0x04)
| 198-382 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3811 | ? 0 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3812 | : 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3813 | extended_glob = oe; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3814 | } executed 580 times by 1 test: end of block Executed by:
| 580 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3815 | if (arg1 != nullstr
| 80-589 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3816 | sh_xfree((arg1), "execute_cmd.c", 3829); executed 589 times by 1 test: sh_xfree((arg1), "execute_cmd.c", 3829); Executed by:
| 589 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3817 | if (arg2 != nullstr
| 3-666 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3818 | sh_xfree((arg2), "execute_cmd.c", 3831); executed 666 times by 1 test: sh_xfree((arg2), "execute_cmd.c", 3831); Executed by:
| 666 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3819 | } executed 669 times by 1 test: end of block Executed by:
| 669 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3820 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3821 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3822 | command_error ("execute_cond_node", 1, cond->type, 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3823 | jump_to_top_level (2); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3824 | result = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3825 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3826 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3827 | if (invert
| 2-1163 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3828 | result = (
executed 2 times by 1 test: result = (result == 0) ? 1 : 0; Executed by:
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3829 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3830 | return executed 1165 times by 1 test: result;return result; Executed by:
executed 1165 times by 1 test: return result; Executed by:
| 1165 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3831 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3832 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3833 | static int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3834 | execute_cond_command (cond_command) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3835 | COND_COM *cond_command; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3836 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3837 | int retval, save_line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3838 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3839 | save_line_number = line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3840 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3841 | this_command_name = "[["; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3842 | line_number_for_err_trap = line_number = cond_command->line; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3843 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3844 | if (variable_context
| 0-596 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3845 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3846 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3847 | line_number -= function_line_number - 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3848 | if (line_number <= 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3849 | line_number = 1; never executed: line_number = 1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3850 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3851 | command_string_index = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3852 | print_cond_command (cond_command); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3853 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3854 | if (signal_in_progress (
| 5-625 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3855 | 65
| 5-625 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3856 | ) == 0
| 5-625 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3857 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3858 | do { if (the_printed_command_except_trap
executed 623 times by 1 test: } while (0);sh_xfree((the_printed_command_except_trap), "execute_cmd.c", 3869); Executed by:
| 2-623 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3859 | the_printed_command_except_trap = (char *)strcpy (sh_xmalloc((1 + strlen (the_printed_command)), "execute_cmd.c", 3870), (the_printed_command)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3860 | } executed 625 times by 1 test: end of block Executed by:
| 625 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3861 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3862 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3863 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3864 | retval = run_debug_trap (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3865 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3866 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3867 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3868 | if (debugging_mode
| 0-625 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3869 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3870 | line_number = save_line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3871 | return never executed: (0);return (0); never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3872 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3873 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3874 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3875 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3876 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3877 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3878 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3879 | last_command_exit_value = retval = execute_cond_node (cond_command); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3880 | line_number = save_line_number; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3881 | return executed 629 times by 1 test: (retval);return (retval); Executed by:
executed 629 times by 1 test: return (retval); Executed by:
| 629 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3882 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3883 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3884 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3885 | static void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3886 | bind_lastarg (arg) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3887 | char *arg; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3888 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3889 | SHELL_VAR *var; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3890 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3891 | if (arg == 0
| 29984529-34714906 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3892 | arg = ""; executed 29984529 times by 1 test: arg = ""; Executed by:
| 29984529 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3893 | var = bind_variable ("_", arg, 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3894 | if (var
| 0-64699435 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3895 | (( executed 64699435 times by 1 test: var)->attributes &= ~(0x0000001));((var)->attributes &= ~(0x0000001)); Executed by:
executed 64699435 times by 1 test: ((var)->attributes &= ~(0x0000001)); Executed by:
| 64699435 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3896 | } executed 64699435 times by 1 test: end of block Executed by:
| 64699435 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3897 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3898 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3899 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3900 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3901 | static int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3902 | execute_null_command (redirects, pipe_in, pipe_out, async) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3903 | REDIRECT *redirects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3904 | int pipe_in, pipe_out, async; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3905 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3906 | int r; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3907 | int forcefork; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3908 | REDIRECT *rd; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3909 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3910 | for (forcefork = 0, rd = redirects; rd
| 46-29961057 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3911 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3912 | forcefork += rd->rflags & 0x01; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3913 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3914 | forcefork += (rd->redirector.dest == 0
| 0-44 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3915 | } executed 46 times by 1 test: end of block Executed by:
| 46 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3916 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3917 | if (forcefork
| 0-29961053 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3918 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3919 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3920 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3921 | if (make_child ((char *)
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3922 | ((void *)0)
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3923 | , async) == 0
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3924 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3925 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3926 | restore_original_signals (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3927 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3928 | do_piping (pipe_in, pipe_out); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3929 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3930 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3931 | coproc_closeall (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3932 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3933 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3934 | interactive = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3935 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3936 | subshell_environment = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3937 | if (async
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3938 | subshell_environment |= 0x01; never executed: subshell_environment |= 0x01; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3939 | if (pipe_in != -1
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3940 | subshell_environment |= 0x10; never executed: subshell_environment |= 0x10; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3941 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3942 | if (do_redirections (redirects, 0x01) == 0
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3943 | exit (0); executed 2 times by 1 test: exit (0); Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3944 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3945 | exit (1); never executed: exit (1); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3946 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3947 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3948 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3949 | close_pipes (pipe_in, pipe_out); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3950 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3951 | if (pipe_out == -1
| 0-2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3952 | unlink_fifo_list (); executed 2 times by 1 test: unlink_fifo_list (); Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3953 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3954 | return executed 2 times by 1 test: (0);return (0); Executed by:
executed 2 times by 1 test: return (0); Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3955 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3956 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3957 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3958 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3959 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3960 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3961 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3962 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3963 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3964 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3965 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3966 | r = do_redirections (redirects, 0x01|0x02); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3967 | cleanup_redirects (redirection_undo_list); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3968 | redirection_undo_list = (REDIRECT *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3969 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3970 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3971 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3972 | if (r != 0
| 0-29961053 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3973 | return never executed: (1);return (1); never executed: return (1); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3974 | else if (last_command_subst_pid != (pid_t)-1
| 3230744-26730309 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3975 | return executed 3230744 times by 1 test: (last_command_exit_value);return (last_command_exit_value); Executed by:
executed 3230744 times by 1 test: return (last_command_exit_value); Executed by:
| 3230744 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3976 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3977 | return executed 26730309 times by 1 test: (0);return (0); Executed by:
executed 26730309 times by 1 test: return (0); Executed by:
| 26730309 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3978 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3979 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3980 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3981 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3982 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3983 | static void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3984 | fix_assignment_words (words) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3985 | WORD_LIST *words; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3986 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3987 | WORD_LIST *w, *wcmd; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3988 | struct builtin *b; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3989 | int assoc, global, array, integer; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3990 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3991 | if (words == 0
| 28-64686671 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3992 | return; executed 28 times by 1 test: return; Executed by:
| 28 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3993 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3994 | b = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3995 | assoc = global = array = integer = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3996 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3997 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3998 | wcmd = words; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3999 | for (wcmd = words; wcmd
| 29963585-71149194 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4000 | if ((
| 34723086-36426108 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4001 | break; executed 34723086 times by 1 test: break; Executed by:
| 34723086 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4002 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4003 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4004 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4005 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4006 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4007 | while (posixly_correct
| 0-64685855 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4008 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4009 | wcmd->word->word
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4010 | ) && __builtin_constant_p (
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4011 | "command"
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4012 | ) && (__s1_len = __builtin_strlen (
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4013 | wcmd->word->word
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4014 | ), __s2_len = __builtin_strlen (
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4015 | "command"
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4016 | ), (!((size_t)(const void *)((
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4017 | wcmd->word->word
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4018 | ) + 1) - (size_t)(const void *)(
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4019 | wcmd->word->word
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4020 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4021 | "command"
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4022 | ) + 1) - (size_t)(const void *)(
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4023 | "command"
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4024 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4025 | wcmd->word->word
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4026 | ,
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4027 | "command"
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4028 | ) : (__builtin_constant_p (
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4029 | wcmd->word->word
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4030 | ) && ((size_t)(const void *)((
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4031 | wcmd->word->word
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4032 | ) + 1) - (size_t)(const void *)(
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4033 | wcmd->word->word
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4034 | ) == 1) && (__s1_len = __builtin_strlen (
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4035 | wcmd->word->word
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4036 | ), __s1_len < 4) ? (__builtin_constant_p (
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4037 | "command"
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4038 | ) && ((size_t)(const void *)((
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4039 | "command"
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4040 | ) + 1) - (size_t)(const void *)(
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4041 | "command"
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4042 | ) == 1) ? __builtin_strcmp (
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4043 | wcmd->word->word
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4044 | ,
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4045 | "command"
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4046 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4047 | "command"
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4048 | ); int __result = (((const unsigned char *) (const char *) (
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4049 | wcmd->word->word
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4050 | ))[0] - __s2[0]); if (__s1_len > 0
| 0-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4051 | wcmd->word->word
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4052 | ))[1] - __s2[1]); if (__s1_len > 1
| 0-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4053 | wcmd->word->word
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4054 | ))[2] - __s2[2]); if (__s1_len > 2
never executed: __result = (((const unsigned char *) (const char *) ( wcmd->word->word ))[3] - __s2[3]);
| 0-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4055 | wcmd->word->word
never executed: __result = (((const unsigned char *) (const char *) ( wcmd->word->word ))[3] - __s2[3]); | 0-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4056 | ))[3] - __s2[3]);
never executed: }__result = (((const unsigned char *) (const char *) ( wcmd->word->word ))[3] - __s2[3]); never executed: }end of block never executed: __result; }))) : (__builtin_constant_p (end of block
| 0-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4057 | "command"
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4058 | ) && ((size_t)(const void *)((
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4059 | "command"
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4060 | ) + 1) - (size_t)(const void *)(
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4061 | "command"
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4062 | ) == 1) && (__s2_len = __builtin_strlen (
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4063 | "command"
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4064 | ), __s2_len < 4) ? (__builtin_constant_p (
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4065 | wcmd->word->word
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4066 | ) && ((size_t)(const void *)((
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4067 | wcmd->word->word
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4068 | ) + 1) - (size_t)(const void *)(
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4069 | wcmd->word->word
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4070 | ) == 1) ? __builtin_strcmp (
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4071 | wcmd->word->word
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4072 | ,
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4073 | "command"
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4074 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4075 | wcmd->word->word
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4076 | ); int __result = (((const unsigned char *) (const char *) (
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4077 | "command"
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4078 | ))[0] - __s2[0]); if (__s2_len > 0
| 0-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4079 | "command"
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4080 | ))[1] - __s2[1]); if (__s2_len > 1
| 0-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4081 | "command"
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4082 | ))[2] - __s2[2]); if (__s2_len > 2
never executed: __result = (((const unsigned char *) (const char *) ( "command" ))[3] - __s2[3]);
| 0-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4083 | "command"
never executed: __result = (((const unsigned char *) (const char *) ( "command" ))[3] - __s2[3]); | 0-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4084 | ))[3] - __s2[3]);
never executed: }__result = (((const unsigned char *) (const char *) ( "command" ))[3] - __s2[3]); never executed: }end of block never executed: __result; }))) : __builtin_strcmp (end of block
| 0-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4085 | wcmd->word->word
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4086 | ,
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4087 | "command"
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4088 | )))); })
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4089 | == 0
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4090 | wcmd = wcmd->next; executed 1 time by 1 test: wcmd = wcmd->next; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4091 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4092 | for (w = wcmd; w
| 50930186-64679869 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4093 | if (w->word->flags & 0x000004
| 5579-50924607 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4094 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4095 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4096 | if (b == 0
| 226-5353 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4097 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4098 | b = builtin_address_internal (wcmd->word->word, 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4099 | if (b == 0
| 14-5339 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4100 | return; executed 4382 times by 1 test: return; Executed by:
| 4382 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4101 | else if (b
| 0-971 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4102 | wcmd->word->flags |= 0x010000; executed 971 times by 1 test: wcmd->word->flags |= 0x010000; Executed by:
| 971 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4103 | } executed 971 times by 1 test: end of block Executed by:
| 971 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4104 | w->word->flags |= (0x000010|0x000020|0x000080|0x020000); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4105 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4106 | if (assoc
| 24-1173 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4107 | w->word->flags |= 0x400000; executed 24 times by 1 test: w->word->flags |= 0x400000; Executed by:
| 24 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4108 | if (array
| 124-1073 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4109 | w->word->flags |= 0x800000; executed 124 times by 1 test: w->word->flags |= 0x800000; Executed by:
| 124 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4110 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4111 | if (global
| 21-1176 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4112 | w->word->flags |= 0x2000000; executed 21 times by 1 test: w->word->flags |= 0x2000000; Executed by:
| 21 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4113 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4114 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4115 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4116 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4117 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4118 | if (b
| 0-1197 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4119 | w->word->flags |= 0x2000000|0x10000000; executed 318 times by 1 test: w->word->flags |= 0x2000000|0x10000000; Executed by:
| 318 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4120 | } executed 1197 times by 1 test: end of block Executed by:
| 1197 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4121 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4122 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4123 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4124 | else if (w->word->word[0] == '-'
| 2789-48908936 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4125 | __builtin_strpbrk (
| 2789-2012882 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4126 | w->word->word+1
| 2789-2012882 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4127 | ,
| 2789-2012882 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4128 | "Aag"
| 2789-2012882 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4129 | )
| 2789-2012882 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4130 | != 0)
| 2789-2012882 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4131 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4132 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4133 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4134 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4135 | if (b == 0
| 9-2780 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4136 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4137 | b = builtin_address_internal (wcmd->word->word, 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4138 | if (b == 0
| 124-2296 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4139 | return; executed 2420 times by 1 test: return; Executed by:
| 2420 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4140 | else if (b
| 0-360 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4141 | wcmd->word->flags |= 0x010000; executed 360 times by 1 test: wcmd->word->flags |= 0x010000; Executed by:
| 360 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4142 | } executed 360 times by 1 test: end of block Executed by:
| 360 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4143 | if ((
| 0-369 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4144 | (
| 0-369 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4145 | 'A'
| 0-369 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4146 | )
| 0-369 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4147 | w->word->word+1
| 0-369 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4148 | )
| 0-369 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4149 | 'A'
| 0-369 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4150 | ) == '\0'
| 0-369 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4151 | w->word->word+1
| 118-251 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4152 | ,
| 118-251 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4153 | 'A'
| 118-251 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4154 | ) : __builtin_strchr (
| 118-251 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4155 | w->word->word+1
| 118-251 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4156 | ,
| 118-251 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4157 | 'A'
| 118-251 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4158 | )))
| 118-251 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4159 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4160 | assoc = 1; executed 118 times by 1 test: assoc = 1; Executed by:
| 118 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4161 | else if ((
| 0-251 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4162 | (
| 0-251 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4163 | 'a'
| 0-251 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4164 | )
| 0-251 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4165 | w->word->word+1
| 0-251 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4166 | )
| 0-251 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4167 | 'a'
| 0-251 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4168 | ) == '\0'
| 0-251 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4169 | w->word->word+1
| 15-236 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4170 | ,
| 15-236 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4171 | 'a'
| 15-236 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4172 | ) : __builtin_strchr (
| 15-236 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4173 | w->word->word+1
| 15-236 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4174 | ,
| 15-236 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4175 | 'a'
| 15-236 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4176 | )))
| 15-236 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4177 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4178 | array = 1; executed 236 times by 1 test: array = 1; Executed by:
| 236 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4179 | if ((
| 0-369 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4180 | (
| 0-369 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4181 | 'g'
| 0-369 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4182 | )
| 0-369 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4183 | w->word->word+1
| 0-369 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4184 | )
| 0-369 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4185 | 'g'
| 0-369 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4186 | ) == '\0'
| 0-369 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4187 | w->word->word+1
| 23-346 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4188 | ,
| 23-346 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4189 | 'g'
| 23-346 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4190 | ) : __builtin_strchr (
| 23-346 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4191 | w->word->word+1
| 23-346 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4192 | ,
| 23-346 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4193 | 'g'
| 23-346 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4194 | )))
| 23-346 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4195 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4196 | global = 1; executed 23 times by 1 test: global = 1; Executed by:
| 23 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4197 | } executed 369 times by 1 test: end of block Executed by:
| 369 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4198 | } executed 64679869 times by 1 test: end of block Executed by:
| 64679869 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4199 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4200 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4201 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4202 | static int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4203 | is_dirname (pathname) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4204 | char *pathname; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4205 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4206 | char *temp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4207 | int ret; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4208 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4209 | temp = search_for_command (pathname, 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4210 | ret = temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4211 | sh_xfree((temp), "execute_cmd.c", 4082); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4212 | return never executed: ret;return ret; never executed: return ret; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4213 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4214 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4215 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4216 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4217 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4218 | static int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4219 | execute_simple_command (simple_command, pipe_in, pipe_out, async, fds_to_close) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4220 | SIMPLE_COM *simple_command; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4221 | int pipe_in, pipe_out, async; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4222 | struct fd_bitmap *fds_to_close; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4223 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4224 | WORD_LIST *words, *lastword; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4225 | char *command_line, *lastarg, *temp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4226 | int first_word_quoted, result, builtin_is_special, already_forked, dofork; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4227 | pid_t old_last_async_pid; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4228 | sh_builtin_func_t *builtin; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4229 | SHELL_VAR *func; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4230 | volatile int old_builtin, old_command_builtin; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4231 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4232 | result = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4233 | special_builtin_failed = builtin_is_special = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4234 | command_line = (char *)0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4235 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4236 | do { if (terminating_signal
never executed: if (interrupt_statetermsig_handler (terminating_signal);
never executed: } while (0);throw_to_top_level (); | 0-64710245 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4237 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4238 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4239 | if (variable_context
| 0-59256649 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4240 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4241 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4242 | line_number -= function_line_number - 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4243 | if (line_number <= 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4244 | line_number = 1; never executed: line_number = 1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4245 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4246 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4247 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4248 | command_string_index = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4249 | print_simple_command (simple_command); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4250 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4251 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4252 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4253 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4254 | if (signal_in_progress (
| 5740-64704505 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4255 | 65
| 5740-64704505 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4256 | ) == 0
| 166-64704505 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4257 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4258 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4259 | do { if (the_printed_command_except_trap
executed 64699140 times by 1 test: } while (0);sh_xfree((the_printed_command_except_trap), "execute_cmd.c", 4128); Executed by:
| 5199-64699140 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4260 | the_printed_command_except_trap = the_printed_command
| 0-64704339 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4261 | } executed 64704339 times by 1 test: end of block Executed by:
| 64704339 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4262 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4263 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4264 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4265 | result = run_debug_trap (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4266 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4267 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4268 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4269 | if (debugging_mode
| 1-64702669 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4270 | return executed 1 time by 1 test: (0);return (0); Executed by:
executed 1 time by 1 test: return (0); Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4271 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4272 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4273 | first_word_quoted = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4274 | simple_command->words
| 51-64710193 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4275 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4276 | last_command_subst_pid = (pid_t)-1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4277 | old_last_async_pid = last_asynchronous_pid; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4278 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4279 | already_forked = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4280 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4281 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4282 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4283 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4284 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4285 | dofork = pipe_in != -1
| 153-64699359 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4286 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4287 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4288 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4289 | if (dofork
| 153-64685637 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4290 | simple_command->words
| 0-141 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4291 | simple_command->words->word->word
| 0-141 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4292 | (
| 0-141 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4293 | dofork = 0; never executed: dofork = 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4294 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4295 | if (dofork
| 24607-64685637 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4296 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4297 | char *p; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4298 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4299 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4300 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4301 | maybe_make_export_env (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4302 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4303 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4304 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4305 | if (make_child (p = (char *)strcpy (sh_xmalloc((1 + strlen (the_printed_command_except_trap)), "execute_cmd.c", 4174), (the_printed_command_except_trap)), async) == 0
| 1129-23478 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4306 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4307 | already_forked = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4308 | simple_command->flags |= 0x40; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4309 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4310 | subshell_environment = 0x08; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4311 | if (pipe_in != -1
| 7-1007 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4312 | subshell_environment |= 0x10; executed 1122 times by 1 test: subshell_environment |= 0x10; Executed by:
| 1122 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4313 | if (async
| 10-1119 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4314 | subshell_environment |= 0x01; executed 10 times by 1 test: subshell_environment |= 0x01; Executed by:
| 10 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4315 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4316 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4317 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4318 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4319 | if (fds_to_close
| 0-1129 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4320 | close_fd_bitmap (fds_to_close); executed 1129 times by 1 test: close_fd_bitmap (fds_to_close); Executed by:
| 1129 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4321 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4322 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4323 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4324 | stdin_redir |= pipe_in != -1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4325 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4326 | do_piping (pipe_in, pipe_out); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4327 | pipe_in = pipe_out = -1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4328 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4329 | coproc_closeall (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4330 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4331 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4332 | last_asynchronous_pid = old_last_async_pid; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4333 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4334 | do { if (sigterm_received
never executed: termsig_handler ( 15 ); | 0-1129 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4335 | 15 never executed: termsig_handler ( 15 ); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4336 | ); never executed: } while (0);termsig_handler ( 15 ); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4337 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4338 | if (async
| 10-1119 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4339 | subshell_level++; executed 10 times by 1 test: subshell_level++; Executed by:
| 10 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4340 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4341 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4342 | do { if (p
executed 1129 times by 1 test: } while (0);sh_xfree((p), "execute_cmd.c", 4209); Executed by:
| 0-1129 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4343 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4344 | } executed 1129 times by 1 test: end of block Executed by:
| 1129 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4345 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4346 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4347 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4348 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4349 | if (pipe_out != -1
| 10644-12834 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4350 | result = last_command_exit_value; executed 12834 times by 1 test: result = last_command_exit_value; Executed by:
| 12834 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4351 | close_pipes (pipe_in, pipe_out); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4352 | command_line = (char *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4353 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4354 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4355 | bind_lastarg ((char *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4356 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4357 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4358 | return executed 23478 times by 1 test: (result);return (result); Executed by:
executed 23478 times by 1 test: return (result); Executed by:
| 23478 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4359 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4360 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4361 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4362 | do { if (terminating_signal
never executed: if (interrupt_statetermsig_handler (terminating_signal);
never executed: } while (0);throw_to_top_level (); | 0-64686766 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4363 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4364 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4365 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4366 | if ((
| 67-64686699 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4367 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4368 | current_fds_to_close = fds_to_close; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4369 | fix_assignment_words (simple_command->words); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4370 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4371 | if (simple_command->flags & 0x08
| 13832323-50854376 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4372 | comsub_ignore_return++; executed 13832323 times by 1 test: comsub_ignore_return++; Executed by:
| 13832323 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4373 | words = expand_words (simple_command->words); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4374 | if (simple_command->flags & 0x08
| 13832312-50851225 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4375 | comsub_ignore_return--; executed 13832312 times by 1 test: comsub_ignore_return--; Executed by:
| 13832312 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4376 | current_fds_to_close = (struct fd_bitmap *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4377 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4378 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4379 | } executed 64683537 times by 1 test: end of block Executed by:
| 64683537 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4380 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4381 | words = copy_word_list (simple_command->words); executed 67 times by 1 test: words = copy_word_list (simple_command->words); Executed by:
| 67 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4382 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4383 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4384 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4385 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4386 | if (words == 0
| 29961057-34722547 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4387 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4388 | this_command_name = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4389 | result = execute_null_command (simple_command->redirects, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4390 | pipe_in, pipe_out, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4391 | already_forked ? 0 : async); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4392 | if (already_forked
| 4-29961051 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4393 | sh_exit (result); executed 4 times by 1 test: sh_exit (result); Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4394 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4395 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4396 | bind_lastarg ((char *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4397 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4398 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4399 | set_pipestatus_from_exit (result); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4400 | return executed 29961051 times by 1 test: (result);return (result); Executed by:
executed 29961051 times by 1 test: return (result); Executed by:
| 29961051 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4401 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4402 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4403 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4404 | lastarg = (char *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4405 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4406 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4407 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4408 | begin_unwind_frame ("simple-command"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4409 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4410 | if (echo_command_at_execute
| 24-34722523 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4411 | xtrace_print_word_list (words, 1); executed 24 times by 1 test: xtrace_print_word_list (words, 1); Executed by:
| 24 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4412 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4413 | builtin = (sh_builtin_func_t *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4414 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4415 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4416 | func = (SHELL_VAR *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4417 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4418 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4419 | if ((
| 67-34722480 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4420 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4421 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4422 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4423 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4424 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4425 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4426 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4427 | if (posixly_correct
| 410-34722070 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4428 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4429 | builtin = find_special_builtin (words->word->word); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4430 | if (builtin
| 113-297 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4431 | builtin_is_special = 1; executed 113 times by 1 test: builtin_is_special = 1; Executed by:
| 113 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4432 | } executed 410 times by 1 test: end of block Executed by:
| 410 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4433 | if (builtin == 0
| 113-34722367 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4434 | func = find_function (words->word->word); executed 34722367 times by 1 test: func = find_function (words->word->word); Executed by:
| 34722367 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4435 | } executed 34722480 times by 1 test: end of block Executed by:
| 34722480 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4436 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4437 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4438 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4439 | if (posixly_correct
| 0-34722136 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4440 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4441 | last_command_exit_value = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4442 | jump_to_top_level (4); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4443 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4444 | tempenv_assign_error = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4445 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4446 | add_unwind_protect (dispose_words, words); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4447 | do { if (terminating_signal
never executed: if (interrupt_statetermsig_handler (terminating_signal);
never executed: } while (0);throw_to_top_level (); | 0-34722547 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4448 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4449 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4450 | for (lastword = words; lastword->next
| 21622997-34722547 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4451 | ; executed 21622997 times by 1 test: ; Executed by:
| 21622997 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4452 | lastarg = lastword->word->word; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4453 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4454 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4455 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4456 | if (words->word->word[0] == '%'
| 0-34722544 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4457 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4458 | this_command_name = async
| 0-3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4459 | last_shell_builtin = this_shell_builtin; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4460 | this_shell_builtin = builtin_address (this_command_name); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4461 | result = (*this_shell_builtin) (words); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4462 | goto executed 3 times by 1 test: return_result;goto return_result; Executed by:
executed 3 times by 1 test: goto return_result; Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4463 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4464 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4465 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4466 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4467 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4468 | if (job_control
| 0-34722347 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4469 | !first_word_quoted
| 0-195 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4470 | !words->next
| 18-177 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4471 | words->word->word[0]
| 0-18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4472 | !simple_command->redirects
| 5-13 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4473 | pipe_in == -1
| 0-13 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4474 | pipe_out == -1
| 0-13 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4475 | (
| 0-13 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4476 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4477 | int job, jflags, started_status; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4478 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4479 | jflags = 0x08|0x10; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4480 | if (((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4481 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4482 | temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4483 | ) && __builtin_constant_p (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4484 | "exact"
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4485 | ) && (__s1_len = __builtin_strlen (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4486 | temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4487 | ), __s2_len = __builtin_strlen (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4488 | "exact"
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4489 | ), (!((size_t)(const void *)((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4490 | temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4491 | ) + 1) - (size_t)(const void *)(
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4492 | temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4493 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4494 | "exact"
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4495 | ) + 1) - (size_t)(const void *)(
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4496 | "exact"
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4497 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4498 | temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4499 | ,
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4500 | "exact"
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4501 | ) : (__builtin_constant_p (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4502 | temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4503 | ) && ((size_t)(const void *)((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4504 | temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4505 | ) + 1) - (size_t)(const void *)(
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4506 | temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4507 | ) == 1) && (__s1_len = __builtin_strlen (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4508 | temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4509 | ), __s1_len < 4) ? (__builtin_constant_p (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4510 | "exact"
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4511 | ) && ((size_t)(const void *)((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4512 | "exact"
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4513 | ) + 1) - (size_t)(const void *)(
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4514 | "exact"
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4515 | ) == 1) ? __builtin_strcmp (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4516 | temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4517 | ,
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4518 | "exact"
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4519 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4520 | "exact"
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4521 | ); int __result = (((const unsigned char *) (const char *) (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4522 | temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4523 | ))[0] - __s2[0]); if (__s1_len > 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4524 | temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4525 | ))[1] - __s2[1]); if (__s1_len > 1
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4526 | temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4527 | ))[2] - __s2[2]); if (__s1_len > 2
never executed: __result = (((const unsigned char *) (const char *) ( temp ))[3] - __s2[3]); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4528 | temp
never executed: __result = (((const unsigned char *) (const char *) ( temp ))[3] - __s2[3]); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4529 | ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4530 | "exact"
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4531 | ) && ((size_t)(const void *)((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4532 | "exact"
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4533 | ) + 1) - (size_t)(const void *)(
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4534 | "exact"
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4535 | ) == 1) && (__s2_len = __builtin_strlen (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4536 | "exact"
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4537 | ), __s2_len < 4) ? (__builtin_constant_p (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4538 | temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4539 | ) && ((size_t)(const void *)((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4540 | temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4541 | ) + 1) - (size_t)(const void *)(
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4542 | temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4543 | ) == 1) ? __builtin_strcmp (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4544 | temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4545 | ,
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4546 | "exact"
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4547 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4548 | temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4549 | ); int __result = (((const unsigned char *) (const char *) (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4550 | "exact"
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4551 | ))[0] - __s2[0]); if (__s2_len > 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4552 | "exact"
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4553 | ))[1] - __s2[1]); if (__s2_len > 1
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4554 | "exact"
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4555 | ))[2] - __s2[2]); if (__s2_len > 2
never executed: __result = (((const unsigned char *) (const char *) ( "exact" ))[3] - __s2[3]); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4556 | "exact"
never executed: __result = (((const unsigned char *) (const char *) ( "exact" ))[3] - __s2[3]); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4557 | ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4558 | temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4559 | ,
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4560 | "exact"
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4561 | )))); })
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4562 | == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4563 | jflags |= 0x04; never executed: jflags |= 0x04; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4564 | else if (((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4565 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4566 | temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4567 | ) && __builtin_constant_p (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4568 | "substring"
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4569 | ) && (__s1_len = __builtin_strlen (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4570 | temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4571 | ), __s2_len = __builtin_strlen (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4572 | "substring"
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4573 | ), (!((size_t)(const void *)((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4574 | temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4575 | ) + 1) - (size_t)(const void *)(
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4576 | temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4577 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4578 | "substring"
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4579 | ) + 1) - (size_t)(const void *)(
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4580 | "substring"
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4581 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4582 | temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4583 | ,
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4584 | "substring"
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4585 | ) : (__builtin_constant_p (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4586 | temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4587 | ) && ((size_t)(const void *)((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4588 | temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4589 | ) + 1) - (size_t)(const void *)(
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4590 | temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4591 | ) == 1) && (__s1_len = __builtin_strlen (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4592 | temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4593 | ), __s1_len < 4) ? (__builtin_constant_p (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4594 | "substring"
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4595 | ) && ((size_t)(const void *)((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4596 | "substring"
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4597 | ) + 1) - (size_t)(const void *)(
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4598 | "substring"
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4599 | ) == 1) ? __builtin_strcmp (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4600 | temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4601 | ,
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4602 | "substring"
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4603 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4604 | "substring"
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4605 | ); int __result = (((const unsigned char *) (const char *) (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4606 | temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4607 | ))[0] - __s2[0]); if (__s1_len > 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4608 | temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4609 | ))[1] - __s2[1]); if (__s1_len > 1
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4610 | temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4611 | ))[2] - __s2[2]); if (__s1_len > 2
never executed: __result = (((const unsigned char *) (const char *) ( temp ))[3] - __s2[3]); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4612 | temp
never executed: __result = (((const unsigned char *) (const char *) ( temp ))[3] - __s2[3]); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4613 | ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4614 | "substring"
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4615 | ) && ((size_t)(const void *)((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4616 | "substring"
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4617 | ) + 1) - (size_t)(const void *)(
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4618 | "substring"
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4619 | ) == 1) && (__s2_len = __builtin_strlen (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4620 | "substring"
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4621 | ), __s2_len < 4) ? (__builtin_constant_p (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4622 | temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4623 | ) && ((size_t)(const void *)((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4624 | temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4625 | ) + 1) - (size_t)(const void *)(
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4626 | temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4627 | ) == 1) ? __builtin_strcmp (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4628 | temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4629 | ,
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4630 | "substring"
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4631 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4632 | temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4633 | ); int __result = (((const unsigned char *) (const char *) (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4634 | "substring"
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4635 | ))[0] - __s2[0]); if (__s2_len > 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4636 | "substring"
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4637 | ))[1] - __s2[1]); if (__s2_len > 1
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4638 | "substring"
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4639 | ))[2] - __s2[2]); if (__s2_len > 2
never executed: __result = (((const unsigned char *) (const char *) ( "substring" ))[3] - __s2[3]); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4640 | "substring"
never executed: __result = (((const unsigned char *) (const char *) ( "substring" ))[3] - __s2[3]); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4641 | ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4642 | temp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4643 | ,
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4644 | "substring"
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4645 | )))); })
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4646 | == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4647 | jflags |= 0x02; never executed: jflags |= 0x02; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4648 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4649 | jflags |= 0x01; never executed: jflags |= 0x01; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4650 | job = get_job_by_name (words->word->word, jflags); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4651 | if (job != -1
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4652 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4653 | run_unwind_frame ("simple-command"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4654 | this_command_name = "fg"; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4655 | last_shell_builtin = this_shell_builtin; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4656 | this_shell_builtin = builtin_address ("fg"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4657 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4658 | started_status = start_job (job, 1); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4659 | return never executed: ((started_status < 0) ? 1 : started_status);return ((started_status < 0) ? 1 : started_status); never executed: return ((started_status < 0) ? 1 : started_status); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4660 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4661 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4662 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4663 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4664 | run_builtin: code before this statement executed 34722544 times by 1 test: run_builtin: Executed by:
| 34722544 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4665 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4666 | this_command_name = words->word->word; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4667 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4668 | do { if (terminating_signal
never executed: if (interrupt_statetermsig_handler (terminating_signal);
never executed: } while (0);throw_to_top_level (); | 0-34722544 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4669 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4670 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4671 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4672 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4673 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4674 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4675 | if (func == 0
| 113-33082069 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4676 | builtin = find_shell_builtin (this_command_name); executed 33081956 times by 1 test: builtin = find_shell_builtin (this_command_name); Executed by:
| 33081956 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4677 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4678 | last_shell_builtin = this_shell_builtin; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4679 | this_shell_builtin = builtin; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4680 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4681 | if (builtin
| 27808-33054261 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4682 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4683 | if (builtin
| 1640475-33054261 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4684 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4685 | old_builtin = executing_builtin; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4686 | old_command_builtin = executing_command_builtin; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4687 | unwind_protect_mem ((char *)&(executing_builtin), sizeof (executing_builtin)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4688 | unwind_protect_mem ((char *)&(executing_command_builtin), sizeof (executing_command_builtin)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4689 | } executed 33054261 times by 1 test: end of block Executed by:
| 33054261 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4690 | if (already_forked
| 1121-34693615 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4691 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4692 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4693 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4694 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4695 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4696 | reset_signal_handlers (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4697 | subshell_environment |= 0x80; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4698 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4699 | if (async
| 7-1114 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4700 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4701 | if ((
| 3-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4702 | pipe_in == -1
| 0-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4703 | (
| 0-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4704 | async_redirect_stdin (); executed 4 times by 1 test: async_redirect_stdin (); Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4705 | setup_async_signals (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4706 | } executed 7 times by 1 test: end of block Executed by:
| 7 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4707 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4708 | if (async == 0
| 7-1114 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4709 | subshell_level++; executed 1114 times by 1 test: subshell_level++; Executed by:
| 1114 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4710 | execute_subshell_builtin_or_function | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4711 | (words, simple_command->redirects, builtin, func, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4712 | pipe_in, pipe_out, async, fds_to_close, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4713 | simple_command->flags); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4714 | subshell_level--; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4715 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4716 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4717 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4718 | result = execute_builtin_or_function | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4719 | (words, builtin, func, simple_command->redirects, fds_to_close, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4720 | simple_command->flags); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4721 | if (builtin
| 1636122-33051025 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4722 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4723 | if (result > 256
| 242-33050783 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4724 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4725 | switch (result) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4726 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4727 | case executed 104 times by 1 test: 259:case 259: Executed by:
executed 104 times by 1 test: case 259: Executed by:
| 104 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4728 | case executed 57 times by 1 test: 260:case 260: Executed by:
executed 57 times by 1 test: case 260: Executed by:
| 57 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4729 | case never executed: 261:case 261: never executed: case 261: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4730 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4731 | if (posixly_correct
| 0-160 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4732 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4733 | last_command_exit_value = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4734 | jump_to_top_level (4); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4735 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4736 | break; executed 160 times by 1 test: break; Executed by:
| 160 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4737 | case never executed: 262:case 262: never executed: case 262: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4738 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4739 | executing_builtin = old_builtin; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4740 | executing_command_builtin = old_command_builtin; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4741 | builtin = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4742 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4743 | goto never executed: execute_from_filesystem;goto execute_from_filesystem; never executed: goto execute_from_filesystem; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4744 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4745 | result = builtin_status (result); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4746 | if (builtin_is_special
| 0-241 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4747 | special_builtin_failed = 1; never executed: special_builtin_failed = 1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4748 | } executed 241 times by 1 test: end of block Executed by:
| 241 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4749 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4750 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4751 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4752 | if (posixly_correct
| 8-33050597 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4753 | merge_temporary_env (); executed 8 times by 1 test: merge_temporary_env (); Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4754 | } executed 33051024 times by 1 test: end of block Executed by:
| 33051024 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4755 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4756 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4757 | if (result == 258
| 0-1636122 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4758 | result = 2; never executed: result = 2; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4759 | else if (result > 256
| 1-1636121 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4760 | result = 1; executed 1 time by 1 test: result = 1; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4761 | } executed 1636122 times by 1 test: end of block Executed by:
| 1636122 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4762 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4763 | set_pipestatus_from_exit (result); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4764 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4765 | goto executed 34687146 times by 1 test: return_result;goto return_result; Executed by:
executed 34687146 times by 1 test: goto return_result; Executed by:
| 34687146 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4766 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4767 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4768 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4769 | if (autocd
| 0-27808 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4770 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4771 | words = make_word_list (make_word ("--"), words); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4772 | words = make_word_list (make_word ("cd"), words); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4773 | xtrace_print_word_list (words, 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4774 | func = find_function ("cd"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4775 | goto never executed: run_builtin;goto run_builtin; never executed: goto run_builtin; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4776 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4777 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4778 | execute_from_filesystem: code before this statement executed 27808 times by 1 test: execute_from_filesystem: Executed by:
| 27808 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4779 | if (command_line == 0
| 0-27808 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4780 | command_line = (char *)strcpy (sh_xmalloc((1 + strlen (the_printed_command_except_trap ? the_printed_command_except_trap : "")), "execute_cmd.c", 4478), (the_printed_command_except_trap ? the_printed_command_except_trap : "")); executed 27808 times by 1 test: command_line = (char *)strcpy (sh_xmalloc((1 + strlen (the_printed_command_except_trap ? the_printed_command_except_trap : "")), "execute_cmd.c", 4478), (the_printed_command_except_trap ? the_printed_command_except_trap : "")); Executed by:
| 27808 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4781 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4782 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4783 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4784 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4785 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4786 | if (already_forked == 0
| 0-27808 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4787 | simple_command->flags &= ~0x40; never executed: simple_command->flags &= ~0x40; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4788 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4789 | result = execute_disk_command (words, simple_command->redirects, command_line, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4790 | pipe_in, pipe_out, async, fds_to_close, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4791 | simple_command->flags); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4792 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4793 | return_result: code before this statement executed 27757 times by 1 test: return_result: Executed by:
| 27757 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4794 | bind_lastarg (lastarg); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4795 | do { if (command_line
executed 27757 times by 1 test: } while (0);sh_xfree((command_line), "execute_cmd.c", 4493); Executed by:
| 27757-34687149 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4796 | dispose_words (words); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4797 | if (builtin
| 1663882-33051024 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4798 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4799 | executing_builtin = old_builtin; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4800 | executing_command_builtin = old_command_builtin; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4801 | } executed 33051024 times by 1 test: end of block Executed by:
| 33051024 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4802 | discard_unwind_frame ("simple-command"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4803 | this_command_name = (char *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4804 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4805 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4806 | return executed 34714906 times by 1 test: (result);return (result); Executed by:
executed 34714906 times by 1 test: return (result); Executed by:
| 34714906 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4807 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4808 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4809 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4810 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4811 | static int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4812 | builtin_status (result) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4813 | int result; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4814 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4815 | int r; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4816 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4817 | switch (result) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4818 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4819 | case executed 81 times by 1 test: 258:case 258: Executed by:
executed 81 times by 1 test: case 258: Executed by:
| 81 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4820 | r = 2; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4821 | break; executed 81 times by 1 test: break; Executed by:
| 81 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4822 | case executed 103 times by 1 test: 259:case 259: Executed by:
executed 103 times by 1 test: case 259: Executed by:
| 103 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4823 | case never executed: 257:case 257: never executed: case 257: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4824 | case executed 57 times by 1 test: 260:case 260: Executed by:
executed 57 times by 1 test: case 260: Executed by:
| 57 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4825 | case never executed: 261:case 261: never executed: case 261: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4826 | r = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4827 | break; executed 160 times by 1 test: break; Executed by:
| 160 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4828 | default never executed: :default: never executed: default: | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4829 | r = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4830 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4831 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4832 | return executed 241 times by 1 test: (r);return (r); Executed by:
executed 241 times by 1 test: return (r); Executed by:
| 241 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4833 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4834 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4835 | static int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4836 | execute_builtin (builtin, words, flags, subshell) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4837 | sh_builtin_func_t *builtin; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4838 | WORD_LIST *words; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4839 | int flags, subshell; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4840 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4841 | int result, eval_unwind, ignexit_flag; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4842 | int isbltinenv, should_keep; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4843 | char *error_trap; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4844 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4845 | error_trap = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4846 | should_keep = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4847 | if (subshell == 0
| 1024-33053117 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4848 | (builtin == eval_builtin
| 2-13828580 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4849 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4850 | begin_unwind_frame ("eval_builtin"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4851 | unwind_protect_mem ((char *)&(exit_immediately_on_error), sizeof (exit_immediately_on_error)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4852 | unwind_protect_mem ((char *)&(builtin_ignoring_errexit), sizeof (builtin_ignoring_errexit)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4853 | error_trap = (signal_is_trapped (
| 0-19 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4854 | 65
| 0-19 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4855 | +1)
| 0-19 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4856 | 65
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4857 | +1) == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4858 | 65 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4859 | +1] : (char *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4860 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4861 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4862 | if (error_trap
| 0-19 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4863 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4864 | error_trap = (char *)strcpy (sh_xmalloc((1 + strlen (error_trap)), "execute_cmd.c", 4560), (error_trap)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4865 | add_unwind_protect (xfree, error_trap); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4866 | add_unwind_protect (set_error_trap, error_trap); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4867 | restore_default_signal ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4868 | 65 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4869 | +1); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4870 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4871 | exit_immediately_on_error = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4872 | ignexit_flag = builtin_ignoring_errexit; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4873 | builtin_ignoring_errexit = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4874 | eval_unwind = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4875 | } executed 19 times by 1 test: end of block Executed by:
| 19 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4876 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4877 | eval_unwind = 0; executed 33054122 times by 1 test: eval_unwind = 0; Executed by:
| 33054122 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4878 | isbltinenv = (builtin == source_builtin
| 25-33052736 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4879 | should_keep = isbltinenv
| 25-33027138 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4880 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4881 | if (builtin == fc_builtin
| 17-33054124 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4882 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4883 | isbltinenv = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4884 | should_keep = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4885 | } executed 1322741 times by 1 test: end of block Executed by:
| 1322741 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4886 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4887 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4888 | if (isbltinenv
| 1349744-31704397 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4889 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4890 | if (subshell == 0
| 4-1349740 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4891 | begin_unwind_frame ("builtin_env"); executed 1349740 times by 1 test: begin_unwind_frame ("builtin_env"); Executed by:
| 1349740 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4892 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4893 | if (temporary_env
| 102-1349642 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4894 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4895 | push_scope (0x08, temporary_env); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4896 | if (flags & 0x0800
| 8-94 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4897 | should_keep = 0; executed 8 times by 1 test: should_keep = 0; Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4898 | if (subshell == 0
| 0-102 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4899 | add_unwind_protect (pop_scope, should_keep ? "1" : 0); executed 102 times by 1 test: add_unwind_protect (pop_scope, should_keep ? "1" : 0); Executed by:
| 102 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4900 | temporary_env = (HASH_TABLE *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4901 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4902 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4903 | } executed 102 times by 1 test: end of block Executed by:
| 102 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4904 | } executed 1349744 times by 1 test: end of block Executed by:
| 1349744 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4905 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4906 | if (subshell == 0
| 1024-33053117 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4907 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4908 | if (evalnest_max > 0
| 0-13184 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4909 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4910 | internal_error ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4911 | dcgettext (((void *)0), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4912 | "eval: maximum eval nesting level exceeded (%d)" | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4913 | , 5) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4914 | , evalnest); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4915 | evalnest = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4916 | jump_to_top_level (2); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4917 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4918 | unwind_protect_mem ((char *)&(evalnest), sizeof (evalnest)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4919 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4920 | evalnest++; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4921 | } executed 13184 times by 1 test: end of block Executed by:
| 13184 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4922 | else if (subshell == 0
| 1024-33039933 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4923 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4924 | if (sourcenest_max > 0
| 0-1403 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4925 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4926 | internal_error ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4927 | dcgettext (((void *)0), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4928 | "%s: maximum source nesting level exceeded (%d)" | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4929 | , 5) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4930 | , this_command_name, sourcenest); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4931 | sourcenest = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4932 | jump_to_top_level (2); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4933 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4934 | unwind_protect_mem ((char *)&(sourcenest), sizeof (sourcenest)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4935 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4936 | sourcenest++; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4937 | } executed 1403 times by 1 test: end of block Executed by:
| 1403 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4938 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4939 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4940 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4941 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4942 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4943 | if (posixly_correct
| 1-33053770 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4944 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4945 | begin_unwind_frame ("return_temp_env"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4946 | add_unwind_protect (merge_temporary_env, (char *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4947 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4948 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4949 | } executed 3 times by 1 test: end of block Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4950 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4951 | executing_builtin++; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4952 | executing_command_builtin |= builtin == command_builtin; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4953 | result = ((*builtin) (words->next)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4954 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4955 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4956 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4957 | if (posixly_correct
| 0-33051510 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4958 | discard_unwind_frame ("return_temp_env"); never executed: discard_unwind_frame ("return_temp_env"); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4959 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4960 | if (subshell == 0
| 1017-33050921 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4961 | run_unwind_frame ("builtin_env"); executed 1349718 times by 1 test: run_unwind_frame ("builtin_env"); Executed by:
| 1349718 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4962 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4963 | if (eval_unwind
| 18-33051920 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4964 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4965 | builtin_ignoring_errexit = ignexit_flag; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4966 | exit_immediately_on_error = builtin_ignoring_errexit
| 0-18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4967 | if (error_trap
| 0-18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4968 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4969 | set_error_trap (error_trap); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4970 | sh_xfree((error_trap), "execute_cmd.c", 4661); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4971 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4972 | discard_unwind_frame ("eval_builtin"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4973 | } executed 18 times by 1 test: end of block Executed by:
| 18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4974 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4975 | return executed 33051938 times by 1 test: (result);return (result); Executed by:
executed 33051938 times by 1 test: return (result); Executed by:
| 33051938 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4976 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4977 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4978 | static void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4979 | maybe_restore_getopt_state (gs) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4980 | sh_getopt_state_t *gs; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4981 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4982 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4983 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4984 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4985 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4986 | if (gs->gs_flags & 1
| 3-1636133 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4987 | sh_getopt_restore_istate (gs); executed 3 times by 1 test: sh_getopt_restore_istate (gs); Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4988 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4989 | sh_xfree((gs), "execute_cmd.c", 4680); executed 1636133 times by 1 test: sh_xfree((gs), "execute_cmd.c", 4680); Executed by:
| 1636133 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4990 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4991 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4992 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4993 | void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4994 | restore_funcarray_state (fa) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4995 | struct func_array_state *fa; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4996 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4997 | SHELL_VAR *nfv; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4998 | ARRAY *funcname_a; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4999 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5000 | do { array_dispose_element (array_shift ((fa->source_a), 1, 0)); } while (0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5001 | do { array_dispose_element (array_shift ((fa->lineno_a), 1, 0)); } while (0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5002 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5003 | do { (nfv) = find_variable ("FUNCNAME"); (funcname_a) = ((nfv) && (((((nfv))->attributes) & (0x0000004)))) ? (ARRAY *)((nfv)->value) : (ARRAY *)0; } while (0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5004 | if (nfv == fa->funcname_v
| 0-1637582 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5005 | do { array_dispose_element (array_shift ((funcname_a), 1, 0)); } executed 1637582 times by 1 test: while (0);end of block Executed by:
| 1637582 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5006 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5007 | sh_xfree((fa), "execute_cmd.c", 4698); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5008 | } executed 1637582 times by 1 test: end of block Executed by:
| 1637582 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5009 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5010 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5011 | static int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5012 | execute_function (var, words, flags, fds_to_close, async, subshell) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5013 | SHELL_VAR *var; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5014 | WORD_LIST *words; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5015 | int flags; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5016 | struct fd_bitmap *fds_to_close; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5017 | int async, subshell; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5018 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5019 | int return_val, result; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5020 | COMMAND *tc, *fc, *save_current; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5021 | char *debug_trap, *error_trap, *return_trap; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5022 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5023 | SHELL_VAR *funcname_v, *bash_source_v, *bash_lineno_v; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5024 | ARRAY *funcname_a; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5025 | volatile ARRAY *bash_source_a; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5026 | volatile ARRAY *bash_lineno_a; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5027 | struct func_array_state *fa; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5028 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5029 | FUNCTION_DEF *shell_fn; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5030 | char *sfile, *t; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5031 | sh_getopt_state_t *gs; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5032 | SHELL_VAR *gv; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5033 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5034 | ((void) &(fc)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5035 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5036 | if (funcnest_max > 0
| 3-1640251 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5037 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5038 | internal_error ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5039 | dcgettext (((void *)0), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5040 | "%s: maximum function nesting level exceeded (%d)" | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5041 | , 5) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5042 | , var->name, funcnest); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5043 | funcnest = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5044 | jump_to_top_level (2); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5045 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5046 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5047 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5048 | do { (funcname_v) = find_variable ("FUNCNAME"); (funcname_a) = ((funcname_v) && (((((funcname_v))->attributes) & (0x0000004)))) ? (ARRAY *)((funcname_v)->value) : (ARRAY *)0; } while (0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5049 | do { (bash_source_v) = find_variable ("BASH_SOURCE"); (bash_source_a) = ((bash_source_v) && (((((bash_source_v))->attributes) & (0x0000004)))) ? (ARRAY *)((bash_source_v)->value) : (ARRAY *)0; } while (0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5050 | do { (bash_lineno_v) = find_variable ("BASH_LINENO"); (bash_lineno_a) = ((bash_lineno_v) && (((((bash_lineno_v))->attributes) & (0x0000004)))) ? (ARRAY *)((bash_lineno_v)->value) : (ARRAY *)0; } while (0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5051 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5052 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5053 | tc = (COMMAND *)copy_command ((COMMAND *)((var)->value)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5054 | if (tc
| 0-1640471 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5055 | tc->flags |= 0x08; executed 3623 times by 1 test: tc->flags |= 0x08; Executed by:
| 3623 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5056 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5057 | gs = sh_getopt_save_istate (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5058 | if (subshell == 0
| 97-1640374 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5059 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5060 | begin_unwind_frame ("function_calling"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5061 | push_context (var->name, subshell, temporary_env); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5062 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5063 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5064 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5065 | add_unwind_protect (maybe_restore_getopt_state, gs); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5066 | add_unwind_protect (pop_context, (char *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5067 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5068 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5069 | unwind_protect_mem ((char *)&(line_number), sizeof (line_number)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5070 | unwind_protect_mem ((char *)&(line_number_for_err_trap), sizeof (line_number_for_err_trap)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5071 | unwind_protect_mem ((char *)&(function_line_number), sizeof (function_line_number)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5072 | unwind_protect_mem ((char *)&(return_catch_flag), sizeof (return_catch_flag)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5073 | unwind_protect_mem ((char *)&(return_catch), sizeof (return_catch)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5074 | add_unwind_protect (dispose_command, (char *)tc); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5075 | unwind_protect_mem ((char *)&(this_shell_function), sizeof (this_shell_function)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5076 | unwind_protect_mem ((char *)&(funcnest), sizeof (funcnest)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5077 | unwind_protect_mem ((char *)&(loop_level), sizeof (loop_level)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5078 | } executed 1640374 times by 1 test: end of block Executed by:
| 1640374 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5079 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5080 | push_context (var->name, subshell, temporary_env); executed 97 times by 1 test: push_context (var->name, subshell, temporary_env); Executed by:
| 97 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5081 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5082 | temporary_env = (HASH_TABLE *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5083 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5084 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5085 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5086 | this_shell_function = var; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5087 | make_funcname_visible (1); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5088 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5089 | debug_trap = (signal_is_trapped (
| 2111-1638360 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5090 | 65
| 2111-1638360 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5091 | )
| 0-1638360 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5092 | 65
| 0-2111 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5093 | ) == 0
| 0-2111 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5094 | 65 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5095 | ] : (char *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5096 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5097 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5098 | error_trap = (signal_is_trapped (
| 0-1640471 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5099 | 65
| 0-1640471 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5100 | +1)
| 0-1640471 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5101 | 65
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5102 | +1) == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5103 | 65 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5104 | +1] : (char *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5105 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5106 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5107 | return_trap = (signal_is_trapped (
| 2081-1638390 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5108 | 65
| 2081-1638390 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5109 | +2)
| 0-1638390 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5110 | 65
| 0-2081 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5111 | +2) == 0
| 0-2081 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5112 | 65 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5113 | +2] : (char *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5114 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5115 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5116 | if (debug_trap
| 6-1638360 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5117 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5118 | if (subshell == 0
| 0-114 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5119 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5120 | debug_trap = (char *)strcpy (sh_xmalloc((1 + strlen (debug_trap)), "execute_cmd.c", 4787), (debug_trap)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5121 | add_unwind_protect (xfree, debug_trap); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5122 | add_unwind_protect (maybe_set_debug_trap, debug_trap); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5123 | } executed 114 times by 1 test: end of block Executed by:
| 114 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5124 | restore_default_signal ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5125 | 65 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5126 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5127 | } executed 114 times by 1 test: end of block Executed by:
| 114 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5128 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5129 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5130 | if (error_trap
| 0-1640471 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5131 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5132 | if (subshell == 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5133 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5134 | error_trap = (char *)strcpy (sh_xmalloc((1 + strlen (error_trap)), "execute_cmd.c", 4799), (error_trap)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5135 | add_unwind_protect (xfree, error_trap); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5136 | add_unwind_protect (maybe_set_error_trap, error_trap); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5137 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5138 | restore_default_signal ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5139 | 65 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5140 | +1); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5141 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5142 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5143 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5144 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5145 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5146 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5147 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5148 | if (return_trap
| 216-1638390 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5149 | 65
| 216-1865 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5150 | )
| 0-1865 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5151 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5152 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5153 | if (subshell == 0
| 0-1896 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5154 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5155 | return_trap = (char *)strcpy (sh_xmalloc((1 + strlen (return_trap)), "execute_cmd.c", 4816), (return_trap)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5156 | add_unwind_protect (xfree, return_trap); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5157 | add_unwind_protect (maybe_set_return_trap, return_trap); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5158 | } executed 1896 times by 1 test: end of block Executed by:
| 1896 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5159 | restore_default_signal ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5160 | 65 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5161 | +2); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5162 | } executed 1896 times by 1 test: end of block Executed by:
| 1896 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5163 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5164 | funcnest++; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5165 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5166 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5167 | shell_fn = find_function_def (this_shell_function->name); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5168 | sfile = shell_fn
| 0-1640471 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5169 | do { array_rshift (((ARRAY *)funcname_a), 1, (this_shell_function->name)); } while (0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5170 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5171 | do { array_rshift (((ARRAY *)bash_source_a), 1, (sfile)); } while (0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5172 | t = itos (executing_line_number ()); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5173 | do { array_rshift (((ARRAY *)bash_lineno_a), 1, (t)); } while (0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5174 | sh_xfree((t), "execute_cmd.c", 4833); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5175 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5176 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5177 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5178 | fa = (struct func_array_state *)sh_xmalloc((sizeof (struct func_array_state)), "execute_cmd.c", 4837); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5179 | fa->source_a = (ARRAY *)bash_source_a; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5180 | fa->source_v = bash_source_v; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5181 | fa->lineno_a = (ARRAY *)bash_lineno_a; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5182 | fa->lineno_v = bash_lineno_v; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5183 | fa->funcname_a = (ARRAY *)funcname_a; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5184 | fa->funcname_v = funcname_v; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5185 | if (subshell == 0
| 97-1640374 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5186 | add_unwind_protect (restore_funcarray_state, fa); executed 1640374 times by 1 test: add_unwind_protect (restore_funcarray_state, fa); Executed by:
| 1640374 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5187 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5188 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5189 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5190 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5191 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5192 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5193 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5194 | if (debugging_mode
| 0-1638344 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5195 | init_bash_argv (); executed 2127 times by 1 test: init_bash_argv (); Executed by:
| 2127 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5196 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5197 | remember_args (words->next, 1); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5198 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5199 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5200 | if (debugging_mode
| 2127-1638344 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5201 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5202 | push_args (words->next); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5203 | if (subshell == 0
| 0-2127 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5204 | add_unwind_protect (pop_args, 0); executed 2127 times by 1 test: add_unwind_protect (pop_args, 0); Executed by:
| 2127 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5205 | } executed 2127 times by 1 test: end of block Executed by:
| 2127 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5206 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5207 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5208 | line_number = function_line_number = tc->line; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5209 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5210 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5211 | if (subshell
| 97-1640374 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5212 | stop_pipeline (async, (COMMAND *) executed 97 times by 1 test: stop_pipeline (async, (COMMAND *) ((void *)0) ); Executed by:
| 97 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5213 | ((void *)0) executed 97 times by 1 test: stop_pipeline (async, (COMMAND *) ((void *)0) ); Executed by:
| 97 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5214 | ); executed 97 times by 1 test: stop_pipeline (async, (COMMAND *) ((void *)0) ); Executed by:
| 97 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5215 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5216 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5217 | if (shell_compatibility_level > 43
| 0-1640471 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5218 | loop_level = 0; executed 1640471 times by 1 test: loop_level = 0; Executed by:
| 1640471 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5219 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5220 | fc = tc; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5221 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5222 | from_return_trap = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5223 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5224 | return_catch_flag++; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5225 | return_val = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5226 | __sigsetjmp ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5227 | (return_catch) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5228 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5229 | 0 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5230 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5231 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5232 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5233 | if (return_val
| 2077-1640471 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5234 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5235 | result = return_catch_value; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5236 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5237 | save_current = currently_executing_command; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5238 | if (from_return_trap == 0
| 0-2077 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5239 | run_return_trap (); executed 2077 times by 1 test: run_return_trap (); Executed by:
| 2077 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5240 | currently_executing_command = save_current; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5241 | } executed 2077 times by 1 test: end of block Executed by:
| 2077 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5242 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5243 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5244 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5245 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5246 | showing_function_line = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5247 | save_current = currently_executing_command; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5248 | result = run_debug_trap (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5249 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5250 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5251 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5252 | if (debugging_mode == 0
| 0-1638344 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5253 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5254 | showing_function_line = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5255 | currently_executing_command = save_current; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5256 | result = execute_command_internal (fc, 0, -1, -1, fds_to_close); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5257 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5258 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5259 | save_current = currently_executing_command; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5260 | run_return_trap (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5261 | currently_executing_command = save_current; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5262 | } executed 1634141 times by 1 test: end of block Executed by:
| 1634141 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5263 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5264 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5265 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5266 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5267 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5268 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5269 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5270 | showing_function_line = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5271 | } executed 1634141 times by 1 test: end of block Executed by:
| 1634141 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5272 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5273 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5274 | gv = find_variable ("OPTIND"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5275 | if (gv
| 0-1636218 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5276 | gs->gs_flags |= 1; executed 3 times by 1 test: gs->gs_flags |= 1; Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5277 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5278 | if (subshell == 0
| 97-1636121 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5279 | run_unwind_frame ("function_calling"); executed 1636121 times by 1 test: run_unwind_frame ("function_calling"); Executed by:
| 1636121 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5280 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5281 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5282 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5283 | restore_funcarray_state (fa); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5284 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5285 | if (debugging_mode
| 0-97 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5286 | pop_args (); never executed: pop_args (); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5287 | } executed 97 times by 1 test: end of block Executed by:
| 97 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5288 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5289 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5290 | if (variable_context == 0
| 0-1623688 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5291 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5292 | make_funcname_visible (0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5293 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5294 | unlink_fifo_list (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5295 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5296 | } executed 1623688 times by 1 test: end of block Executed by:
| 1623688 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5297 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5298 | return executed 1636218 times by 1 test: (result);return (result); Executed by:
executed 1636218 times by 1 test: return (result); Executed by:
| 1636218 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5299 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5300 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5301 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5302 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5303 | int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5304 | execute_shell_function (var, words) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5305 | SHELL_VAR *var; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5306 | WORD_LIST *words; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5307 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5308 | int ret; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5309 | struct fd_bitmap *bitmap; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5310 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5311 | bitmap = new_fd_bitmap (32); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5312 | begin_unwind_frame ("execute-shell-function"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5313 | add_unwind_protect (dispose_fd_bitmap, (char *)bitmap); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5314 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5315 | ret = execute_function (var, words, 0, bitmap, 0, 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5316 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5317 | dispose_fd_bitmap (bitmap); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5318 | discard_unwind_frame ("execute-shell-function"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5319 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5320 | return never executed: ret;return ret; never executed: return ret; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5321 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5322 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5323 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5324 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5325 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5326 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5327 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5328 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5329 | static void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5330 | execute_subshell_builtin_or_function (words, redirects, builtin, var, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5331 | pipe_in, pipe_out, async, fds_to_close, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5332 | flags) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5333 | WORD_LIST *words; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5334 | REDIRECT *redirects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5335 | sh_builtin_func_t *builtin; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5336 | SHELL_VAR *var; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5337 | int pipe_in, pipe_out, async; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5338 | struct fd_bitmap *fds_to_close; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5339 | int flags; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5340 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5341 | int result, r, funcvalue; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5342 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5343 | int jobs_hack; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5344 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5345 | jobs_hack = (
| 0-1121 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5346 | ((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5347 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5348 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5349 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5350 | login_shell = interactive = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5351 | if (builtin == eval_builtin
| 0-1121 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5352 | evalnest = 0; never executed: evalnest = 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5353 | else if (builtin == source_builtin
| 2-1119 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5354 | sourcenest = 0; executed 2 times by 1 test: sourcenest = 0; Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5355 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5356 | if (async
| 7-1114 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5357 | subshell_environment |= 0x01; executed 7 times by 1 test: subshell_environment |= 0x01; Executed by:
| 7 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5358 | if (pipe_in != -1
| 0-1121 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5359 | subshell_environment |= 0x10; never executed: subshell_environment |= 0x10; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5360 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5361 | maybe_make_export_env (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5362 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5363 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5364 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5365 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5366 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5367 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5368 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5369 | if (jobs_hack
| 0-1121 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5370 | kill_current_pipeline (); never executed: kill_current_pipeline (); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5371 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5372 | without_job_control (); executed 1121 times by 1 test: without_job_control (); Executed by:
| 1121 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5373 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5374 | set_sigchld_handler (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5375 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5376 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5377 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5378 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5379 | set_sigint_handler (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5380 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5381 | if (fds_to_close
| 0-1121 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5382 | close_fd_bitmap (fds_to_close); executed 1121 times by 1 test: close_fd_bitmap (fds_to_close); Executed by:
| 1121 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5383 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5384 | do_piping (pipe_in, pipe_out); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5385 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5386 | if (do_redirections (redirects, 0x01) != 0
| 0-1121 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5387 | exit (1); never executed: exit (1); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5388 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5389 | if (builtin
| 97-1024 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5390 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5391 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5392 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5393 | result = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5394 | __sigsetjmp ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5395 | (top_level) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5396 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5397 | 0 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5398 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5399 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5400 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5401 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5402 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5403 | funcvalue = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5404 | if (return_catch_flag
| 1-834 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5405 | funcvalue = executed 1 time by 1 test: funcvalue = __sigsetjmp ( (return_catch) , 0 ) ; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5406 | __sigsetjmp ( executed 1 time by 1 test: funcvalue = __sigsetjmp ( (return_catch) , 0 ) ; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5407 | (return_catch) executed 1 time by 1 test: funcvalue = __sigsetjmp ( (return_catch) , 0 ) ; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5408 | , executed 1 time by 1 test: funcvalue = __sigsetjmp ( (return_catch) , 0 ) ; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5409 | 0 executed 1 time by 1 test: funcvalue = __sigsetjmp ( (return_catch) , 0 ) ; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5410 | ) executed 1 time by 1 test: funcvalue = __sigsetjmp ( (return_catch) , 0 ) ; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5411 | ; executed 1 time by 1 test: funcvalue = __sigsetjmp ( (return_catch) , 0 ) ; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5412 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5413 | if (result == 3
| 6-1025 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5414 | exit (last_command_exit_value); executed 6 times by 1 test: exit (last_command_exit_value); Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5415 | else if (result
| 0-1025 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5416 | exit (1); never executed: exit (1); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5417 | else if (funcvalue
| 1-1024 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5418 | exit (return_catch_value); executed 1 time by 1 test: exit (return_catch_value); Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5419 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5420 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5421 | r = execute_builtin (builtin, words, flags, 1); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5422 | fflush ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5423 | stdout | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5424 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5425 | if (r == 258
| 0-1017 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5426 | r = 2; never executed: r = 2; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5427 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5428 | else if (r == 262
| 0-1017 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5429 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5430 | char *command_line; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5431 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5432 | command_line = (char *)strcpy (sh_xmalloc((1 + strlen (the_printed_command_except_trap ? the_printed_command_except_trap : "")), "execute_cmd.c", 5069), (the_printed_command_except_trap ? the_printed_command_except_trap : "")); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5433 | r = execute_disk_command (words, (REDIRECT *)0, command_line, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5434 | -1, -1, async, (struct fd_bitmap *)0, flags|0x40); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5435 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5436 | sh_exit (r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5437 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5438 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5439 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5440 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5441 | r = execute_function (var, words, flags, fds_to_close, async, 1); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5442 | fflush ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5443 | stdout | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5444 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5445 | sh_exit (r); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5446 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5447 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5448 | static int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5449 | execute_builtin_or_function (words, builtin, var, redirects, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5450 | fds_to_close, flags) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5451 | WORD_LIST *words; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5452 | sh_builtin_func_t *builtin; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5453 | SHELL_VAR *var; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5454 | REDIRECT *redirects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5455 | struct fd_bitmap *fds_to_close; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5456 | int flags; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5457 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5458 | int result; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5459 | REDIRECT *saved_undo_list; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5460 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5461 | int ofifo, nfifo, osize; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5462 | char *ofifo_list; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5463 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5464 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5465 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5466 | begin_unwind_frame ("saved_fifos"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5467 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5468 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5469 | ofifo = num_fifos (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5470 | ofifo_list = copy_fifo_list (&osize); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5471 | if (ofifo_list
| 1994575-32699040 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5472 | add_unwind_protect (xfree, ofifo_list); executed 1994575 times by 1 test: add_unwind_protect (xfree, ofifo_list); Executed by:
| 1994575 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5473 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5474 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5475 | if (do_redirections (redirects, 0x01|0x02) != 0
| 105-34693494 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5476 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5477 | undo_partial_redirects (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5478 | dispose_exec_redirects (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5479 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5480 | sh_xfree((ofifo_list), "execute_cmd.c", 5124); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5481 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5482 | return executed 105 times by 1 test: (259);return (259); Executed by:
executed 105 times by 1 test: return (259); Executed by:
| 105 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5483 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5484 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5485 | saved_undo_list = redirection_undo_list; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5486 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5487 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5488 | if (builtin == exec_builtin
| 266-34693228 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5489 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5490 | dispose_redirects (saved_undo_list); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5491 | saved_undo_list = exec_redirection_undo_list; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5492 | exec_redirection_undo_list = (REDIRECT *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5493 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5494 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5495 | } executed 266 times by 1 test: end of block Executed by:
| 266 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5496 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5497 | dispose_exec_redirects (); executed 34693228 times by 1 test: dispose_exec_redirects (); Executed by:
| 34693228 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5498 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5499 | if (saved_undo_list
| 5551-34687943 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5500 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5501 | begin_unwind_frame ("saved-redirects"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5502 | add_unwind_protect (cleanup_redirects, (char *)saved_undo_list); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5503 | } executed 5551 times by 1 test: end of block Executed by:
| 5551 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5504 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5505 | redirection_undo_list = (REDIRECT *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5506 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5507 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5508 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5509 | if (builtin
| 1640377-33053117 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5510 | result = execute_builtin (builtin, words, flags, 0); executed 33053117 times by 1 test: result = execute_builtin (builtin, words, flags, 0); Executed by:
| 33053117 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5511 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5512 | result = execute_function (var, words, flags, fds_to_close, 0, 0); executed 1640377 times by 1 test: result = execute_function (var, words, flags, fds_to_close, 0, 0); Executed by:
| 1640377 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5513 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5514 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5515 | fflush ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5516 | stdout | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5517 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5518 | fpurge ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5519 | stdout | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5520 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5521 | if (ferror (
| 1-34687041 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5522 | stdout
| 1-34687041 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5523 | )
| 1-34687041 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5524 | clearerr ( executed 1 time by 1 test: clearerr ( stdout ); Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5525 | stdout executed 1 time by 1 test: clearerr ( stdout ); Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5526 | ); executed 1 time by 1 test: clearerr ( stdout ); Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5527 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5528 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5529 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5530 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5531 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5532 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5533 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5534 | if (builtin == command_builtin
| 2-34686933 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5535 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5536 | int discard; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5537 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5538 | discard = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5539 | if (saved_undo_list
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5540 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5541 | dispose_redirects (saved_undo_list); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5542 | discard = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5543 | } executed 1 time by 1 test: end of block Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5544 | redirection_undo_list = exec_redirection_undo_list; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5545 | saved_undo_list = exec_redirection_undo_list = (REDIRECT *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5546 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5547 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5548 | if (discard
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5549 | discard_unwind_frame ("saved-redirects"); executed 1 time by 1 test: discard_unwind_frame ("saved-redirects"); Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5550 | } executed 2 times by 1 test: end of block Executed by:
| 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5551 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5552 | if (saved_undo_list
| 5542-34681500 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5553 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5554 | redirection_undo_list = saved_undo_list; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5555 | discard_unwind_frame ("saved-redirects"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5556 | } executed 5542 times by 1 test: end of block Executed by:
| 5542 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5557 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5558 | undo_partial_redirects (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5559 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5560 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5561 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5562 | nfifo = num_fifos (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5563 | if (nfifo > ofifo
| 9-34687033 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5564 | close_new_fifos (ofifo_list, osize); executed 9 times by 1 test: close_new_fifos (ofifo_list, osize); Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5565 | if (ofifo_list
| 1994565-32692477 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5566 | sh_xfree((ofifo_list), "execute_cmd.c", 5196); executed 1994565 times by 1 test: sh_xfree((ofifo_list), "execute_cmd.c", 5196); Executed by:
| 1994565 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5567 | discard_unwind_frame ("saved_fifos"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5568 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5569 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5570 | return executed 34687042 times by 1 test: (result);return (result); Executed by:
executed 34687042 times by 1 test: return (result); Executed by:
| 34687042 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5571 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5572 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5573 | void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5574 | setup_async_signals () | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5575 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5576 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5577 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5578 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5579 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5580 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5581 | if (job_control == 0
| 2-1409 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5582 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5583 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5584 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5585 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5586 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5587 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5588 | get_original_signal ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5589 | 2 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5590 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5591 | set_signal_handler ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5592 | 2 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5593 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5594 | ((__sighandler_t) 1) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5595 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5596 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5597 | get_original_signal ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5598 | 3 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5599 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5600 | set_signal_handler ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5601 | 3 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5602 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5603 | ((__sighandler_t) 1) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5604 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5605 | } executed 1409 times by 1 test: end of block Executed by:
| 1409 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5606 | } executed 1411 times by 1 test: end of block Executed by:
| 1411 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5607 | static int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5608 | execute_disk_command (words, redirects, command_line, pipe_in, pipe_out, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5609 | async, fds_to_close, cmdflags) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5610 | WORD_LIST *words; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5611 | REDIRECT *redirects; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5612 | char *command_line; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5613 | int pipe_in, pipe_out, async; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5614 | struct fd_bitmap *fds_to_close; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5615 | int cmdflags; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5616 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5617 | char *pathname, *command, **args, *p; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5618 | int nofork, stdpath, result; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5619 | pid_t pid; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5620 | SHELL_VAR *hookf; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5621 | WORD_LIST *wl; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5622 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5623 | stdpath = (cmdflags & 0x4000); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5624 | nofork = (cmdflags & 0x40); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5625 | pathname = words->word->word; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5626 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5627 | p = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5628 | result = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5629 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5630 | command = (char *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5631 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5632 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5633 | if (restricted
| 1-27806 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5634 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5635 | internal_error ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5636 | dcgettext (((void *)0), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5637 | "%s: restricted: cannot specify `/' in command names" | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5638 | , 5) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5639 | , | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5640 | pathname); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5641 | result = last_command_exit_value = 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5642 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5643 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5644 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5645 | if (nofork
| 0-1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5646 | exit (last_command_exit_value); never executed: exit (last_command_exit_value); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5647 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5648 | goto executed 1 time by 1 test: parent_return;goto parent_return; Executed by:
executed 1 time by 1 test: goto parent_return; Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5649 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5650 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5651 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5652 | command = search_for_command (pathname, 0x01|(stdpath ? 0x02 : 0)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5653 | do { if (terminating_signal
never executed: if (interrupt_statetermsig_handler (terminating_signal);
never executed: } while (0);throw_to_top_level (); | 0-27807 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5654 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5655 | if (command
| 53-27754 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5656 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5657 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5658 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5659 | if (nofork
| 0-27753 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5660 | adjust_shell_level (-1); executed 1 time by 1 test: adjust_shell_level (-1); Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5661 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5662 | maybe_make_export_env (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5663 | put_command_name_into_env (command); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5664 | } executed 27754 times by 1 test: end of block Executed by:
| 27754 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5665 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5666 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5667 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5668 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5669 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5670 | if (nofork
| 0-27797 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5671 | pid = 0; executed 10 times by 1 test: pid = 0; Executed by:
| 10 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5672 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5673 | pid = make_child (p = (char *)strcpy (sh_xmalloc((1 + strlen (command_line)), "execute_cmd.c", 5310), (command_line)), async); executed 27797 times by 1 test: pid = make_child (p = (char *)strcpy (sh_xmalloc((1 + strlen (command_line)), "execute_cmd.c", 5310), (command_line)), async); Executed by:
| 27797 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5674 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5675 | if (pid == 0
| 51-27756 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5676 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5677 | int old_interactive; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5678 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5679 | reset_terminating_signals (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5680 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5681 | restore_original_signals (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5682 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5683 | do { if (sigterm_received
never executed: termsig_handler ( 15 ); | 0-51 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5684 | 15 never executed: termsig_handler ( 15 ); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5685 | ); never executed: } while (0);termsig_handler ( 15 ); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5686 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5687 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5688 | do { if (p
executed 41 times by 1 test: } while (0);sh_xfree((p), "execute_cmd.c", 5323); Executed by:
| 10-41 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5689 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5690 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5691 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5692 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5693 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5694 | if (async
| 0-51 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5695 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5696 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5697 | pipe_in == -1
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5698 | (
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5699 | async_redirect_stdin (); never executed: async_redirect_stdin (); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5700 | setup_async_signals (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5701 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5702 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5703 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5704 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5705 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5706 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5707 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5708 | if (fds_to_close
| 0-51 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5709 | close_fd_bitmap (fds_to_close); executed 51 times by 1 test: close_fd_bitmap (fds_to_close); Executed by:
| 51 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5710 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5711 | do_piping (pipe_in, pipe_out); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5712 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5713 | old_interactive = interactive; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5714 | if (async
| 0-51 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5715 | interactive = 0; never executed: interactive = 0; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5716 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5717 | subshell_environment |= 0x08; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5718 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5719 | if (redirects
| 3-36 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5720 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5721 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5722 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5723 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5724 | unlink_fifo_list (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5725 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5726 | exit (1); executed 8 times by 1 test: exit (1); Executed by:
| 8 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5727 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5728 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5729 | if (async
| 0-39 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5730 | interactive = old_interactive; never executed: interactive = old_interactive; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5731 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5732 | if (command == 0
| 18-21 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5733 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5734 | hookf = find_function ("command_not_found_handle"); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5735 | if (hookf == 0
| 0-21 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5736 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5737 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5738 | pathname = printable_filename (pathname, 0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5739 | internal_error ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5740 | dcgettext (((void *)0), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5741 | "%s: command not found" | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5742 | , 5) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5743 | , pathname); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5744 | exit (127); executed 21 times by 1 test: exit (127); Executed by:
| 21 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5745 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5746 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5747 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5748 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5749 | kill_current_pipeline (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5750 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5751 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5752 | wl = make_word_list (make_word ("command_not_found_handle"), words); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5753 | exit (execute_shell_function (hookf, wl)); never executed: exit (execute_shell_function (hookf, wl)); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5754 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5755 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5756 | do { if (sigterm_received
never executed: termsig_handler ( 15 ); | 0-18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5757 | 15 never executed: termsig_handler ( 15 ); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5758 | ); never executed: } while (0);termsig_handler ( 15 ); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5759 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5760 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5761 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5762 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5763 | args = strvec_from_word_list (words, 0, 0, (int *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5764 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5765 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5766 | exit (shell_execve (command, args, export_env)); executed 18 times by 1 test: exit (shell_execve (command, args, export_env)); Executed by:
| 18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5767 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5768 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5769 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5770 | parent_return: | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5771 | do { if (terminating_signal
never executed: if (interrupt_statetermsig_handler (terminating_signal);
never executed: } while (0);throw_to_top_level (); | 0-27757 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5772 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5773 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5774 | close_pipes (pipe_in, pipe_out); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5775 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5776 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5777 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5778 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5779 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5780 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5781 | do { if (command
executed 27724 times by 1 test: } while (0);sh_xfree((command), "execute_cmd.c", 5408); Executed by:
| 33-27724 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5782 | return executed 27757 times by 1 test: (result);return (result); Executed by:
executed 27757 times by 1 test: return (result); Executed by:
| 27757 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5783 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5784 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5785 | static char * | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5786 | getinterp (sample, sample_len, endp) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5787 | char *sample; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5788 | int sample_len, *endp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5789 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5790 | register int i; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5791 | char *execname; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5792 | int start; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5793 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5794 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5795 | for (i = 2; i < sample_len
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5796 | ; never executed: ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5797 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5798 | for (start = i; (i < sample_len
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5799 | ; never executed: ; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5800 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5801 | execname = substring (sample, start, i); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5802 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5803 | if (endp
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5804 | * never executed: endp = i;*endp = i; never executed: *endp = i; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5805 | return never executed: execname;return execname; never executed: return execname; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5806 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5807 | static void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5808 | initialize_subshell () | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5809 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5810 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5811 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5812 | delete_all_aliases (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5813 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5814 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5815 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5816 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5817 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5818 | history_lines_this_session = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5819 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5820 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5821 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5822 | without_job_control (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5823 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5824 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5825 | set_sigchld_handler (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5826 | init_job_stats (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5827 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5828 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5829 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5830 | reset_shell_flags (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5831 | reset_shell_options (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5832 | reset_shopt_options (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5833 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5834 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5835 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5836 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5837 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5838 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5839 | if ((((
| 0-15 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5840 | shell_variables = shell_variables->down; never executed: shell_variables = shell_variables->down; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5841 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5842 | clear_unwind_protect_list (0); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5843 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5844 | parse_and_execute_level = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5845 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5846 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5847 | variable_context = return_catch_flag = funcnest = evalnest = sourcenest = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5848 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5849 | executing_list = 0; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5850 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5851 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5852 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5853 | if (interactive_shell == 0
| 0-15 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5854 | unset_bash_input (0); executed 15 times by 1 test: unset_bash_input (0); Executed by:
| 15 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5855 | } executed 15 times by 1 test: end of block Executed by:
| 15 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5856 | int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5857 | shell_execve (command, args, env) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5858 | char *command; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5859 | char **args, **env; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5860 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5861 | int larray, i, fd; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5862 | char sample[128]; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5863 | int sample_len; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5864 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5865 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5866 | execve (command, args, env); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5867 | i = | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5868 | (*__errno_location ()) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5869 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5870 | do { if (terminating_signal
never executed: } while (0);termsig_handler (terminating_signal); | 0-20 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5871 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5872 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5873 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5874 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5875 | if (i !=
| 5-15 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5876 | 8
| 5-15 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5877 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5878 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5879 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5880 | last_command_exit_value = (
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5881 | 2
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5882 | )
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5883 | if (file_isdir (command)
| 1-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5884 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5885 | internal_error ( executed 1 time by 1 test: internal_error ( dcgettext (((void *)0), "%s: %s" , 5) , command, strerror ( 21 )); Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5886 | dcgettext (((void *)0), executed 1 time by 1 test: internal_error ( dcgettext (((void *)0), "%s: %s" , 5) , command, strerror ( 21 )); Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5887 | "%s: %s" executed 1 time by 1 test: internal_error ( dcgettext (((void *)0), "%s: %s" , 5) , command, strerror ( 21 )); Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5888 | , 5) executed 1 time by 1 test: internal_error ( dcgettext (((void *)0), "%s: %s" , 5) , command, strerror ( 21 )); Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5889 | , command, strerror ( executed 1 time by 1 test: internal_error ( dcgettext (((void *)0), "%s: %s" , 5) , command, strerror ( 21 )); Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5890 | 21 executed 1 time by 1 test: internal_error ( dcgettext (((void *)0), "%s: %s" , 5) , command, strerror ( 21 )); Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5891 | )); executed 1 time by 1 test: internal_error ( dcgettext (((void *)0), "%s: %s" , 5) , command, strerror ( 21 )); Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5892 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5893 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5894 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5895 | else if (executable_file (command) == 0
| 0-4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5896 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5897 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5898 | (*__errno_location ()) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5899 | = i; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5900 | file_error (command); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5901 | } executed 4 times by 1 test: end of block Executed by:
| 4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5902 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5903 | else if (i ==
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5904 | 7
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5905 | || i ==
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5906 | 12
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5907 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5908 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5909 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5910 | (*__errno_location ()) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5911 | = i; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5912 | file_error (command); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5913 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5914 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5915 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5916 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5917 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5918 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5919 | do { fd = open(command, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5920 | 00 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5921 | ); if (fd >= 0
never executed: else sample_len = -1;end of block never executed: } while (0);sample_len = -1; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5922 | if (sample_len > 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5923 | sample[sample_len - 1] = '\0'; never executed: sample[sample_len - 1] = '\0'; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5924 | if (sample_len > 2
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5925 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5926 | char *interp; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5927 | int ilen; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5928 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5929 | interp = getinterp (sample, sample_len, (int *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5930 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5931 | ); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5932 | ilen = strlen (interp); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5933 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5934 | (*__errno_location ()) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5935 | = i; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5936 | if (interp[ilen - 1] == '\r'
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5937 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5938 | interp = sh_xrealloc((interp), (ilen + 2), "execute_cmd.c", 5647); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5939 | interp[ilen - 1] = '^'; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5940 | interp[ilen] = 'M'; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5941 | interp[ilen + 1] = '\0'; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5942 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5943 | sys_error ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5944 | dcgettext (((void *)0), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5945 | "%s: %s: bad interpreter" | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5946 | , 5) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5947 | , command, interp ? interp : ""); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5948 | do { if (interp
never executed: } while (0);sh_xfree((interp), "execute_cmd.c", 5653); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5949 | return never executed: (126);return (126); never executed: return (126); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5950 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5951 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5952 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5953 | (*__errno_location ()) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5954 | = i; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5955 | file_error (command); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5956 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5957 | return executed 5 times by 1 test: (last_command_exit_value);return (last_command_exit_value); Executed by:
executed 5 times by 1 test: return (last_command_exit_value); Executed by:
| 5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5958 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5959 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5960 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5961 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5962 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5963 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5964 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5965 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5966 | do { fd = open(command, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5967 | 00 | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5968 | ); if (fd >= 0
executed 15 times by 1 test: else sample_len = -1;end of block Executed by:
never executed: } while (0);sample_len = -1; | 0-15 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5969 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5970 | if (sample_len == 0
| 0-15 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5971 | return never executed: (0);return (0); never executed: return (0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5972 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5973 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5974 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5975 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5976 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5977 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5978 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5979 | if (sample_len > 0
| 0-15 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5980 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5981 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5982 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5983 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5984 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5985 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5986 | if (check_binary_file (sample, sample_len)
| 0-15 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5987 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5988 | internal_error ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5989 | dcgettext (((void *)0), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5990 | "%s: cannot execute binary file: %s" | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5991 | , 5) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5992 | , command, strerror (i)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5993 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5994 | (*__errno_location ()) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5995 | = i; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5996 | return never executed: (126);return (126); never executed: return (126); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5997 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5998 | } executed 15 times by 1 test: end of block Executed by:
| 15 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5999 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6000 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6001 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6002 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6003 | reset_parser (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6004 | initialize_subshell (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6005 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6006 | set_sigint_handler (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6007 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6008 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6009 | larray = strvec_len (args) + 1; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6010 | args = strvec_resize (args, larray + 1); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6011 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6012 | for (i = larray - 1; i
| 15-28 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6013 | args[i] = args[i - 1]; executed 28 times by 1 test: args[i] = args[i - 1]; Executed by:
| 28 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6014 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6015 | args[0] = shell_name; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6016 | args[1] = command; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6017 | args[larray] = (char *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6018 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6019 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6020 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6021 | if (args[0][0] == '-'
| 0-15 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6022 | args[0]++; never executed: args[0]++; | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6023 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6024 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6025 | if (restricted
| 0-15 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6026 | change_flag ('r', '+'); never executed: change_flag ('r', '+'); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6027 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6028 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6029 | if (subshell_argv
| 1-14 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6030 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6031 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6032 | for (i = 1; i < subshell_argc
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6033 | sh_xfree((subshell_argv[i]), "execute_cmd.c", 5726); executed 1 time by 1 test: sh_xfree((subshell_argv[i]), "execute_cmd.c", 5726); Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6034 | sh_xfree((subshell_argv), "execute_cmd.c", 5727); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6035 | } executed 1 time by 1 test: end of block Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6036 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6037 | dispose_command (currently_executing_command); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6038 | currently_executing_command = (COMMAND *) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6039 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6040 | ; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6041 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6042 | subshell_argc = larray; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6043 | subshell_argv = args; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6044 | subshell_envp = env; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6045 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6046 | unbind_args (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6047 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6048 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6049 | clear_fifo_list (); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6050 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6051 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6052 | siglongjmp((subshell_top_level), (1)); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6053 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6054 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6055 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6056 | static int | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6057 | execute_intern_function (name, funcdef) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6058 | WORD_DESC *name; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6059 | FUNCTION_DEF *funcdef; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6060 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6061 | SHELL_VAR *var; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6062 | char *t; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6063 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6064 | if (check_identifier (name, posixly_correct) == 0
| 1-11159 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6065 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6066 | if (posixly_correct
| 0-1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6067 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6068 | last_command_exit_value = 2; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6069 | jump_to_top_level (4); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6070 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6071 | return never executed: (1);return (1); never executed: return (1); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6072 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6073 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6074 | if ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6075 | (
| 0-11159 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6076 | '\001'
| 0-11159 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6077 | )
| 0-11159 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6078 | name->word
| 0-11159 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6079 | )
| 0-11159 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6080 | '\001'
| 0-11159 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6081 | ) == '\0'
| 0-11159 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6082 | name->word
| 0-11159 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6083 | ,
| 0-11159 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6084 | '\001'
| 0-11159 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6085 | ) : __builtin_strchr (
| 0-11159 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6086 | name->word
| 0-11159 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6087 | ,
| 0-11159 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6088 | '\001'
| 0-11159 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6089 | )))
| 0-11159 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6090 | ) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6091 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6092 | t = dequote_escapes (name->word); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6093 | sh_xfree((name->word), "execute_cmd.c", 5768); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6094 | name->word = t; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6095 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6096 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6097 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6098 | if (posixly_correct
| 0-11156 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6099 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6100 | internal_error ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6101 | dcgettext (((void *)0), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6102 | "`%s': is a special builtin" | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6103 | , 5) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6104 | , name->word); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6105 | last_command_exit_value = 2; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6106 | jump_to_top_level (interactive_shell ? 2 : 4); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6107 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6108 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6109 | var = find_function (name->word); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6110 | if (var
| 0-9974 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6111 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6112 | if (((((
| 0-5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6113 | internal_error ( executed 5 times by 1 test: internal_error ( dcgettext (((void *)0), "%s: readonly function" , 5) , var->name); Executed by:
| 5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6114 | dcgettext (((void *)0), executed 5 times by 1 test: internal_error ( dcgettext (((void *)0), "%s: readonly function" , 5) , var->name); Executed by:
| 5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6115 | "%s: readonly function" executed 5 times by 1 test: internal_error ( dcgettext (((void *)0), "%s: readonly function" , 5) , var->name); Executed by:
| 5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6116 | , 5) executed 5 times by 1 test: internal_error ( dcgettext (((void *)0), "%s: readonly function" , 5) , var->name); Executed by:
| 5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6117 | , var->name); executed 5 times by 1 test: internal_error ( dcgettext (((void *)0), "%s: readonly function" , 5) , var->name); Executed by:
| 5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6118 | return executed 5 times by 1 test: (1);return (1); Executed by:
executed 5 times by 1 test: return (1); Executed by:
| 5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6119 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6120 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6121 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6122 | bind_function_def (name->word, funcdef, 1); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6123 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6124 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6125 | bind_function (name->word, funcdef->command); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6126 | return executed 11154 times by 1 test: (0);return (0); Executed by:
executed 11154 times by 1 test: return (0); Executed by:
| 11154 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6127 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6128 | static void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6129 | close_pipes (in, out) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6130 | int in, out; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6131 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6132 | if (in >= 0
| 12274-43729 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6133 | close (in); executed 12274 times by 1 test: close (in); Executed by:
| 12274 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6134 | if (out >= 0
| 13369-42634 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6135 | close (out); executed 13369 times by 1 test: close (out); Executed by:
| 13369 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6136 | } executed 56003 times by 1 test: end of block Executed by:
| 56003 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6137 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6138 | static void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6139 | dup_error (oldd, newd) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6140 | int oldd, newd; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6141 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6142 | sys_error ( | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6143 | dcgettext (((void *)0), | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6144 | "cannot duplicate fd %d to fd %d" | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6145 | , 5) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6146 | , oldd, newd); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6147 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6148 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6149 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6150 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6151 | static void | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6152 | do_piping (pipe_in, pipe_out) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6153 | int pipe_in, pipe_out; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6154 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6155 | if (pipe_in != -1
| 1103-2478 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6156 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6157 | if (dup2 (pipe_in, 0) < 0
| 0-1103 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6158 | dup_error (pipe_in, 0); never executed: dup_error (pipe_in, 0); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6159 | if (pipe_in > 0
| 0-1103 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6160 | close (pipe_in); executed 1103 times by 1 test: close (pipe_in); Executed by:
| 1103 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6161 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6162 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6163 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6164 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6165 | } executed 1103 times by 1 test: end of block Executed by:
| 1103 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6166 | if (pipe_out != -1
| 1034-2547 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6167 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6168 | if (pipe_out != -2
| 0-1034 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6169 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6170 | if (dup2 (pipe_out, 1) < 0
| 0-1034 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6171 | dup_error (pipe_out, 1); never executed: dup_error (pipe_out, 1); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6172 | if (pipe_out == 0
| 0-1034 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6173 | close (pipe_out); executed 1034 times by 1 test: close (pipe_out); Executed by:
| 1034 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6174 | } executed 1034 times by 1 test: end of block Executed by:
| 1034 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6175 | else | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6176 | { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6177 | if (dup2 (1, 2) < 0
| 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6178 | dup_error (1, 2); never executed: dup_error (1, 2); | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6179 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6180 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6181 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6182 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6183 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6184 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6185 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6186 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6187 | } executed 3581 times by 1 test: end of block Executed by:
| 3581 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Switch to Source code | Preprocessed file |