diff options
-rw-r--r-- | daemon.sh | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 } |