Open garthk opened 2 years ago
I can reproduce this:
❯ fd -t f . /etc/sv/issue-20 -X head
==> /etc/sv/issue-20/run <==
#!/bin/sh
echo 'Sleeping for 60 seconds.'
exec /usr/bin/sleep 60
==> /etc/sv/issue-20/log/run <==
#!/bin/sh
exec /usr/bin/false
❯ ls -l /etc/init.d/issue-20
lrwxrwxrwx 1 root root 11 Aug 5 18:09 /etc/init.d/issue-20 -> /usr/bin/sv
❯ sudo /etc/init.d/issue-20 status
run: issue-20: (pid 8220) 44s; down: log: 1s, normally up, want up
❯ echo $? # expecting 0
3
PR up momentarily.
sv(8) says:
This isn't entirely true. If the service has a
log
, the exit code instead reflects the status of the log. In src/sv.c:154-176 you'll seerc
updated ifchdir("log")
andsvstatus_get()
succeed, after which theif (lsb)
branch to theswitch
will calldone
reflecting the log's status.This strikes me as a bug in the code, not the man page.