Project

General

Profile

Actions

Feature #11987

open

daemons can't show the backtrace of rb_bug

Added by naruse (Yui NARUSE) about 8 years ago. Updated about 8 years ago.

Status:
Open
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.

Updated by normalperson (Eric Wong) about 8 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'

Actions

Also available in: Atom PDF

Like0
Like0