aboutsummaryrefslogtreecommitdiffstats
path: root/sbin/sysinstall/exec.c
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>1994-10-21 05:36:43 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>1994-10-21 05:36:43 +0000
commit57a3ad3e15710ad5fd8dc5b1d86e298bd3e594f8 (patch)
tree6dd1a4ec4bb30ab5795d6debd033d80f18e737d9 /sbin/sysinstall/exec.c
parent5500c9038c9af5b139f9dcc8f05a401db9fd4fc4 (diff)
downloadsrc-57a3ad3e15710ad5fd8dc5b1d86e298bd3e594f8.tar.gz
src-57a3ad3e15710ad5fd8dc5b1d86e298bd3e594f8.zip
Now stage2 runs all the way..
Notes
Notes: svn path=/head/; revision=3753
Diffstat (limited to 'sbin/sysinstall/exec.c')
-rw-r--r--sbin/sysinstall/exec.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sbin/sysinstall/exec.c b/sbin/sysinstall/exec.c
index 8f8889d42e2c..793ff303becb 100644
--- a/sbin/sysinstall/exec.c
+++ b/sbin/sysinstall/exec.c
@@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
- * $Id: utils.c,v 1.4 1994/10/20 19:30:56 ache Exp $
+ * $Id: exec.c,v 1.1 1994/10/21 02:14:49 phk Exp $
*
*/
@@ -33,7 +33,6 @@ exec(int magic, char *cmd, char *args, ...)
int pid, w, status;
char *argv[EXEC_MAXARG];
int arg = 0;
- int no_args = 0;
va_list ap;
struct stat dummy;
int i;
@@ -53,13 +52,19 @@ exec(int magic, char *cmd, char *args, ...)
if ((pid = fork()) == 0) {
switch (magic) {
+ case 0:
+ close(0); open("/dev/null",O_RDONLY);
+ close(1); open("/dev/null",O_WRONLY);
+ close(2); open("/dev/null",O_WRONLY);
+ break;
case 1:
close(0);
i = open("/file.list",O_RDONLY);
if (i != 0) {
- perror("/etc/file.list");
- exit(2);
+ perror("Couldn't open /etc/file.list");
}
+ close(1); open("/dev/null",O_WRONLY);
+ close(2); open("/dev/null",O_WRONLY);
break;
default:
break;