Project

General

Profile

Feature #11987

daemons can't show the backtrace of rb_bug

Added by naruse (Yui NARUSE) almost 4 years ago. Updated almost 4 years ago.

Status:
Open
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:72842]

Description

Ruby shows backtrace and other information into stderr on rb_bug.
But daemon process redirects stderr into /dev/null.
How do I get the log?

NOTE: if I can reproduce this, I can use strace to get it. But issues are not always reproducible.

History

Updated by normalperson (Eric Wong) almost 4 years ago

I always recommend pointing stderr to a regular file using
IO#reopen after daemonization. Perhaps kwargs may be added
to Process.daemon to encourage this usage?

Process.daemon err: '/path/to/stderr.log', out: '/path/to/stdout.log'

Also available in: Atom PDF