* Possible bug in various runit programs
@ 2008-09-12 20:20 David Reiss
2008-09-26 8:43 ` Gerrit Pape
0 siblings, 1 reply; 2+ messages in thread
From: David Reiss @ 2008-09-12 20:20 UTC (permalink / raw)
To: supervision
I was trying to run a daemon under runsvdir/runsv using chpst in my run script.
The daemon was unable to start up, and gave this very confusing error:
2008-09-12_11:12:09.67178 chpst: fatal: unable to open current working directory: no error
I tracked it down to these lines in chpst:
if (! (wdir =open_read(".")))
fatal("unable to open current working directory");
The problem is that open returns -1 on failure, not 0, which is a valid
file descriptor (I was closing stdin when spawning runsvdir).
Grepping runit for '! (.*open' (no quotes) revealed a lot of places where
this same problem could be happening.
To work around this, I just added </dev/null to the exec line in my run script.
I tried to check to see if this issue was fixed in the latest experimental code
(I am using runit-2.0.0), but I could not find a VCS link on the runit site.
Did I just miss it?
--David
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Possible bug in various runit programs
2008-09-12 20:20 Possible bug in various runit programs David Reiss
@ 2008-09-26 8:43 ` Gerrit Pape
0 siblings, 0 replies; 2+ messages in thread
From: Gerrit Pape @ 2008-09-26 8:43 UTC (permalink / raw)
To: supervision
David Reiss <dreiss <at> facebook.com> writes:
> 2008-09-12_11:12:09.67178 chpst: fatal: unable to open current working
directory: no error
> I tracked it down to these lines in chpst:
> if (! (wdir =open_read(".")))
> fatal("unable to open current working directory");
> The problem is that open returns -1 on failure, not 0, which is a valid
> file descriptor (I was closing stdin when spawning runsvdir).
> Grepping runit for '! (.*open' (no quotes) revealed a lot of places where
> this same problem could be happening.
Yes, I confirm the bug, thanks a lot for spotting this error.
Regards, Gerrit.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-09-26 8:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-12 20:20 Possible bug in various runit programs David Reiss
2008-09-26 8:43 ` Gerrit Pape
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).