aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2003-06-13 21:46:08 +0000
committerBill Nottingham <notting@redhat.com>2003-06-13 21:46:08 +0000
commita1264de80fbb439076f4314b16e869fc198fb388 (patch)
treedc5c973c1fbdf36a20a776055a5c9b24a8f94b6b /src/process.c
parent781b0f41187b41c3cf1d2e0f570ec2432b146660 (diff)
downloadinitscripts-a1264de80fbb439076f4314b16e869fc198fb388.tar
initscripts-a1264de80fbb439076f4314b16e869fc198fb388.tar.gz
initscripts-a1264de80fbb439076f4314b16e869fc198fb388.tar.bz2
initscripts-a1264de80fbb439076f4314b16e869fc198fb388.tar.xz
initscripts-a1264de80fbb439076f4314b16e869fc198fb388.zip
fix leaked fd, potential usernetctl badness, and initlog/process bogons (<linux_4ever@yahoo.com>)
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/process.c b/src/process.c
index 585123c4..6948b8a4 100644
--- a/src/process.c
+++ b/src/process.c
@@ -266,8 +266,9 @@ int runCommand(char *cmd, int reexec, int quiet, int debug) {
cmdname = basename(args[0]);
else
cmdname = basename(args[1]);
- if ((cmdname[0] =='K' || cmdname[0] == 'S') && ( '0' <= cmdname[1] <= '9' )
- && ( '0' <= cmdname[2] <= '9' ) )
+ if ((cmdname[0] =='K' || cmdname[0] == 'S') &&
+ ( cmdname[1] >= '0' && cmdname[1] <= '9' ) &&
+ ( cmdname[2] >= '0' && cmdname[2] <= '9' ) )
cmdname+=3;
if (!reexec) {
pid=forkCommand(args,&fds[0],&fds[1],NULL,quiet);