mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Raise EPIPE at broken pipe for the backward compatibility
Instead of SignalException for SIGPIPE, raise `Errno::EPIPE` with instance variable `signo` and re-send that signal at exit. [Feature #14413]
This commit is contained in:
parent
d72fd1e45b
commit
155f64e3c4
Notes:
git
2020-04-15 22:08:49 +09:00
4 changed files with 23 additions and 9 deletions
|
@ -474,6 +474,10 @@ error_handle(rb_execution_context_t *ec, int ex)
|
|||
rb_ivar_get(errinfo, id_signo) != INT2FIX(SIGSEGV)) {
|
||||
/* no message when exiting by signal */
|
||||
}
|
||||
else if (rb_obj_is_kind_of(errinfo, rb_eSystemCallError) &&
|
||||
FIXNUM_P(rb_attr_get(errinfo, id_signo))) {
|
||||
/* no message when exiting by error to be mapped to signal */
|
||||
}
|
||||
else {
|
||||
rb_ec_error_print(ec, errinfo);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue