summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--daemon.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/daemon.sh b/daemon.sh
index 3fcbc99..4197fc8 100644
--- a/daemon.sh
+++ b/daemon.sh
@@ -2,7 +2,7 @@
get_ident() {
local pid=$1
- ps h -o lstart -p "$pid"
+ cut -d ' ' -f 22 /proc/$pid/stat
}
is_running() {
@@ -44,7 +44,7 @@ main() {
echo "daemon: starting \`$id'"
nohup "$@" > "$OUTFILE" 2> "$ERRFILE" &
pid=$!
- echo "$pid" "`get_ident $pid`" > "$PIDFILE"
+ echo "$pid" "$(get_ident $pid)" > "$PIDFILE"
fi
}