Lines 169-174
Link Here
|
169 |
"cp", 0, 0, 0, |
169 |
"cp", 0, 0, 0, |
170 |
}; |
170 |
}; |
171 |
|
171 |
|
|
|
172 |
static char *empty[] = { |
173 |
0, |
174 |
}; |
175 |
|
172 |
/* |
176 |
/* |
173 |
* first, copy the `iname' to the `oname' |
177 |
* first, copy the `iname' to the `oname' |
174 |
*/ |
178 |
*/ |
Lines 180-186
Link Here
|
180 |
case 0: /* child */ |
184 |
case 0: /* child */ |
181 |
copy[1] = iname; |
185 |
copy[1] = iname; |
182 |
copy[2] = oname; |
186 |
copy[2] = oname; |
183 |
execve("/bin/cp", copy, (char **)0); |
187 |
execve("/bin/cp", copy, empty); |
184 |
perror("/bin/cp"); |
188 |
perror("/bin/cp"); |
185 |
exit(1); |
189 |
exit(1); |
186 |
|
190 |
|
Lines 277-283
Link Here
|
277 |
static char *copy[] = { |
281 |
static char *copy[] = { |
278 |
"cp", 0, 0, 0, |
282 |
"cp", 0, 0, 0, |
279 |
}; |
283 |
}; |
280 |
|
284 |
|
|
|
285 |
static char *empty[] = { |
286 |
0, |
287 |
}; |
288 |
|
281 |
/* |
289 |
/* |
282 |
* first, copy the `iname' to the `oname' |
290 |
* first, copy the `iname' to the `oname' |
283 |
*/ |
291 |
*/ |
Lines 289-295
Link Here
|
289 |
case 0: /* child */ |
297 |
case 0: /* child */ |
290 |
copy[1] = iname; |
298 |
copy[1] = iname; |
291 |
copy[2] = oname; |
299 |
copy[2] = oname; |
292 |
execve("/bin/cp", copy, 0); |
300 |
execve("/bin/cp", copy, empty); |
293 |
perror("/bin/cp"); |
301 |
perror("/bin/cp"); |
294 |
exit(1); |
302 |
exit(1); |
295 |
|
303 |
|