[#84280] [Ruby trunk Bug#14181] hangs or deadlocks from waitpid, threads, and trapping SIGCHLD — nobu@...
Issue #14181 has been updated by nobu (Nobuyoshi Nakada).
3 messages
2017/12/15
[#84398] [Ruby trunk Bug#14220] WEBrick changes - failures on MSWIN, MinGW — Greg.mpls@...
Issue #14220 has been reported by MSP-Greg (Greg L).
3 messages
2017/12/22
[#84472] Re: [ruby-dev:50394] [Ruby trunk Bug#14240] warn four special variables: $; $, $/ $\ — Eric Wong <normalperson@...>
Shouldn't English posts be on ruby-core instead of ruby-dev?
3 messages
2017/12/26
[ruby-core:84405] [Ruby trunk Bug#7917] Can't write to a Logger in a signal handler
From:
hkmaly@...
Date:
2017-12-22 13:05:30 UTC
List:
ruby-core #84405
Issue #7917 has been updated by hkmaly (Honza Maly). What IS the recommended way to fix this if Mutex nor Thread are safe in signal handler? Also created question for what is safe in signal handler in general as #14222 ---------------------------------------- Bug #7917: Can't write to a Logger in a signal handler https://bugs.ruby-lang.org/issues/7917#change-68596 * Author: mperham (Mike Perham) * Status: Rejected * Priority: Normal * Assignee: kosaki (Motohiro KOSAKI) * Target version: 2.1.0 * ruby -v: 2.0.0-rc2 * Backport: 2.3: UNKNOWN, 2.4: UNKNOWN ---------------------------------------- Looks like Ruby 2.0 does not allow Mutex#lock within a signal handler. This prevents Logger from working since it uses an underlying mutex. log writing failed. can't be called from trap context log writing failed. can't be called from trap context log writing failed. can't be called from trap context log writing failed. can't be called from trap context Here's Ruby code which reproduces the problem: require 'logger' LOG = Logger.new(STDOUT) LOG.info "Now logging!" trap 'INT' do LOG.info "Hello" end sleep LOG.info "Done" Run it and hit Ctrl-C. -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>