Module Name: src
Committed By: christos
Date: Sat Oct 17 22:36:23 UTC 2009
Modified Files:
src/usr.bin/script: script.c
Log Message:
use system to parse args
To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/script/script.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/script/script.c
diff -u src/usr.bin/script/script.c:1.18 src/usr.bin/script/script.c:1.19
--- src/usr.bin/script/script.c:1.18 Sat Oct 17 15:05:54 2009
+++ src/usr.bin/script/script.c Sat Oct 17 18:36:23 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: script.c,v 1.18 2009/10/17 19:05:54 christos Exp $ */
+/* $NetBSD: script.c,v 1.19 2009/10/17 22:36:23 christos Exp $ */
/*
* Copyright (c) 1980, 1992, 1993
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)script.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: script.c,v 1.18 2009/10/17 19:05:54 christos Exp $");
+__RCSID("$NetBSD: script.c,v 1.19 2009/10/17 22:36:23 christos Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -269,11 +269,12 @@
if (shell == NULL)
shell = _PATH_BSHELL;
execl(shell, shell, "-i", NULL);
- command = shell;
- } else
- execlp(command, command, NULL);
+ warn("execl `%s'", shell);
+ } else {
+ if (system(command) == -1)
+ warn("system `%s'", command);
+ }
- warn("execl %s", command);
fail();
}