Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

breaks if /proc/self/fd/[012] already closed #34

Open
mralusw opened this issue May 21, 2021 · 0 comments
Open

breaks if /proc/self/fd/[012] already closed #34

mralusw opened this issue May 21, 2021 · 0 comments

Comments

@mralusw
Copy link

mralusw commented May 21, 2021

... at least with -o / -e, since these log files then open as fd 0 and/or 1. Maybe daemonize should call redirect_fds() in daemon.c before anything else (not after opening -o / -e)

Also, docs seem to imply that daemonize closes all fd's before starting the daemon. The daemon itself is not supposed to close all fd's, since otherwise it loses locking. But the question is what to do before starting the daemon (or daemonize itself, since it currently doesn't close fd's >= 3 and caller has to close those manually).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant