commit ddff1338f2a4c45e72aaa67bdb67b9f1dfb20c06
parent 489d2deb075e9041f897e79f3522bd2a55dc4088
Author: leitner <leitner>
Date: Thu, 24 Apr 2003 16:16:11 +0000
get msvc exit code right
add small comment "documentation" to listpids
Diffstat:
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/listpids b/listpids
@@ -1,6 +1,9 @@
#!/bin/sh
+
+# trivial shell script to list the running services
+
for i in `find /etc/minit -type d | grep -v /etc/minit$ | sed 's@/etc/minit/@@'`; do
- msvc $i > /dev/null
+ msvc $i >/dev/null 2>&1
if test $? = 0; then
echo $i
fi
diff --git a/msvc.c b/msvc.c
@@ -132,7 +132,7 @@ main(int argc,char *argv[]) {
buffer_puts(buffer_2,argv[1]);
buffer_putsflush(buffer_2,": no such service.\n");
}
- goto error;
+ return 1;
} else {
int i;
int ret=0;
@@ -215,10 +215,10 @@ dokill:
buffer_puts(buffer_2," to PID ");
buffer_putulong(buffer_2,pid);
buffer_putsflush(buffer_2,"\n");
+error:
ret=1;
}
}
-error:
return ret;
}
} else {