Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/script use system to parse args
details: https://anonhg.NetBSD.org/src/rev/1de698124e78
branches: trunk
changeset: 748231:1de698124e78
user: christos <christos%NetBSD.org@localhost>
date: Sat Oct 17 22:36:23 2009 +0000
description:
use system to parse args
diffstat:
usr.bin/script/script.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diffs (35 lines):
diff -r cb8c20f83ce0 -r 1de698124e78 usr.bin/script/script.c
--- a/usr.bin/script/script.c Sat Oct 17 22:33:55 2009 +0000
+++ b/usr.bin/script/script.c Sat Oct 17 22:36:23 2009 +0000
@@ -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();
}
Home |
Main Index |
Thread Index |
Old Index