Skip to content

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

Description

@mralusw

... 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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions