change `exn:break:hang-up' handling to skip display
Since SIGHUP normally means that the output has gone away, don't try to write to it. Closes PR 13058 (although it doesn't solve the more general problem that is noted in the PR)
This commit is contained in:
parent
088d1dadb4
commit
23722e64c2
|
@ -406,7 +406,8 @@ it returns, an exception is raised (to be handled by an exception
|
|||
handler that reports both the original and newly raised exception).
|
||||
|
||||
The default uncaught-exception handler prints an error message using
|
||||
the current @tech{error display handler} (see @racket[error-display-handler]).
|
||||
the current @tech{error display handler} (see @racket[error-display-handler]),
|
||||
unless the argument to the handler is an instance of @racket[exn:break:hang-up].
|
||||
If the argument to the handler is an instance of @racket[exn:break:hang-up]
|
||||
or @racket[exn:break:terminate], the default uncaught-exception handler
|
||||
then calls the @tech{exit handler} with @racket[1], which normally exits
|
||||
|
|
|
@ -783,9 +783,14 @@ call_error(char *buffer, int len, Scheme_Object *exn)
|
|||
scheme_set_cont_mark(scheme_exn_handler_key, v);
|
||||
scheme_push_break_enable(&cframe2, 0, 0);
|
||||
|
||||
p[0] = scheme_make_immutable_sized_utf8_string(buffer, len);
|
||||
p[1] = exn;
|
||||
scheme_apply_multi(display_handler, 2, p);
|
||||
if (SCHEME_CHAPERONE_STRUCTP(exn)
|
||||
&& (scheme_is_struct_instance(exn_table[MZEXN_BREAK_HANG_UP].type, exn))) {
|
||||
/* skip printout */
|
||||
} else {
|
||||
p[0] = scheme_make_immutable_sized_utf8_string(buffer, len);
|
||||
p[1] = exn;
|
||||
scheme_apply_multi(display_handler, 2, p);
|
||||
}
|
||||
|
||||
if (SCHEME_CHAPERONE_STRUCTP(exn)
|
||||
&& (scheme_is_struct_instance(exn_table[MZEXN_BREAK_HANG_UP].type, exn)
|
||||
|
|
Loading…
Reference in New Issue
Block a user