Skip to content

Detatch doesn't consider external logging #70

@johlym

Description

@johlym

We're noticing with the daemons gem that when it detaches the process for daemonization, it closes all the file descriptors and I/O streams. On the surface that's fine, but when it re-opens them, it doesn't consider external I/O streams and only opens the STD* pipes and logging to files. It seems like there's an assumption that the only logging that would take place is internal via one of the STDs or to a file. An example would be using the papertrail/remote_syslog_loger gem and witnessing the stream cut off (RemoteSyslogLogger::UdpSender error: IOError: closed stream).

If I'm way off here or there's a workaround for this, let me know. We see this the most in relation to the use of the delayed_job gem, which uses daemons.

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