Deleted Added
full compact
system.c (8633) system.c (8640)
1/*
2 * The new sysinstall program.
3 *
4 * This is probably the last program in the `sysinstall' line - the next
5 * generation being essentially a complete rewrite.
6 *
1/*
2 * The new sysinstall program.
3 *
4 * This is probably the last program in the `sysinstall' line - the next
5 * generation being essentially a complete rewrite.
6 *
7 * $Id: system.c,v 1.19 1995/05/19 16:58:58 jkh Exp $
7 * $Id: system.c,v 1.20 1995/05/19 21:30:35 jkh Exp $
8 *
9 * Jordan Hubbard
10 *
11 * My contributions are in the public domain.
12 *
13 * Parts of this file are also blatently stolen from Poul-Henning Kamp's
14 * previous version of sysinstall, and as such fall under his "BEERWARE license"
15 * so buy him a beer if you like it! Buy him a beer for me, too!

--- 283 unchanged lines hidden (view full) ---

299 switch(pid = vfork()) {
300 case -1: /* error */
301 (void)sigsetmask(omask);
302 i = 127;
303
304 case 0: /* child */
305 (void)sigsetmask(omask);
306 if (DebugFD != -1) {
8 *
9 * Jordan Hubbard
10 *
11 * My contributions are in the public domain.
12 *
13 * Parts of this file are also blatently stolen from Poul-Henning Kamp's
14 * previous version of sysinstall, and as such fall under his "BEERWARE license"
15 * so buy him a beer if you like it! Buy him a beer for me, too!

--- 283 unchanged lines hidden (view full) ---

299 switch(pid = vfork()) {
300 case -1: /* error */
301 (void)sigsetmask(omask);
302 i = 127;
303
304 case 0: /* child */
305 (void)sigsetmask(omask);
306 if (DebugFD != -1) {
307 msgInfo("Command output is on debugging screen - type ALT-F2 to see it");
307 if (OnVTY)
308 msgInfo("Command output is on debugging screen - type ALT-F2 to see it");
308 dup2(DebugFD, 0);
309 dup2(DebugFD, 1);
310 dup2(DebugFD, 2);
311 }
312 execl("/stand/sh", "sh", "-c", cmd, (char *)NULL);
313 i = 127;
314 }
315 intsave = signal(SIGINT, SIG_IGN);
316 quitsave = signal(SIGQUIT, SIG_IGN);
317 pid = waitpid(pid, (int *)&pstat, 0);
318 (void)sigsetmask(omask);
319 (void)signal(SIGINT, intsave);
320 (void)signal(SIGQUIT, quitsave);
321 i = (pid == -1) ? -1 : pstat.w_status;
322 msgDebug("Command `%s' returns status of %d\n", cmd, i);
323 free(cmd);
324 return i;
325}
309 dup2(DebugFD, 0);
310 dup2(DebugFD, 1);
311 dup2(DebugFD, 2);
312 }
313 execl("/stand/sh", "sh", "-c", cmd, (char *)NULL);
314 i = 127;
315 }
316 intsave = signal(SIGINT, SIG_IGN);
317 quitsave = signal(SIGQUIT, SIG_IGN);
318 pid = waitpid(pid, (int *)&pstat, 0);
319 (void)sigsetmask(omask);
320 (void)signal(SIGINT, intsave);
321 (void)signal(SIGQUIT, quitsave);
322 i = (pid == -1) ? -1 : pstat.w_status;
323 msgDebug("Command `%s' returns status of %d\n", cmd, i);
324 free(cmd);
325 return i;
326}