mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-22 20:42:03 -08:00
New condition for Unix signals.
This commit is contained in:
parent
dc2ce379ec
commit
b54f17085c
4 changed files with 18 additions and 1 deletions
|
|
@ -1945,5 +1945,9 @@ cl_symbols[] = {
|
|||
{EXT_ "SSE-PACK-ELEMENT-TYPE", EXT_ORDINARY, si_sse_pack_element_type, 1, OBJNULL},
|
||||
#endif
|
||||
|
||||
{EXT_ "UNIX-SIGNAL-RECEIVED", EXT_ORDINARY, NULL, -1, OBJNULL},
|
||||
{EXT_ "UNIX-SIGNAL-RECEIVED-CODE", EXT_ORDINARY, NULL, -1, OBJNULL},
|
||||
{KEY_ "CODE", KEYWORD, NULL, -1, OBJNULL},
|
||||
|
||||
/* Tag for end of list */
|
||||
{NULL, CL_ORDINARY, NULL, -1, OBJNULL}};
|
||||
|
|
|
|||
|
|
@ -1945,5 +1945,9 @@ cl_symbols[] = {
|
|||
{EXT_ "SSE-PACK-ELEMENT-TYPE","si_sse_pack_element_type"},
|
||||
#endif
|
||||
|
||||
{EXT_ "UNIX-SIGNAL-RECEIVED",NULL},
|
||||
{EXT_ "UNIX-SIGNAL-RECEIVED-CODE",NULL},
|
||||
{KEY_ "CODE",NULL},
|
||||
|
||||
/* Tag for end of list */
|
||||
{NULL,NULL}};
|
||||
|
|
|
|||
|
|
@ -367,7 +367,7 @@ handle_signal_now(cl_object signal_code)
|
|||
{
|
||||
switch (type_of(signal_code)) {
|
||||
case t_fixnum:
|
||||
FEerror("Serious signal ~D caught.", 1, signal_code);
|
||||
cl_error(3, @'ext::unix-signal-received', @':code', signal_code);
|
||||
break;
|
||||
case t_symbol:
|
||||
cl_error(1, signal_code);
|
||||
|
|
|
|||
|
|
@ -515,6 +515,15 @@ or return to an outer frame, undoing all the function calls so far."
|
|||
(format stream "Memory limit reached. Please jump to an outer pointer, quit program and enlarge the
|
||||
memory limits before executing the program again."))))
|
||||
|
||||
(define-condition ext:unix-signal-received ()
|
||||
((code :type fixnum
|
||||
:initform 0
|
||||
:initarg :signal-code
|
||||
:accessor ext:unix-signal-received-code))
|
||||
(:report (lambda (condition stream)
|
||||
(format stream "Serious signal ~D caught."
|
||||
(ext:unix-signal-received-code condition)))))
|
||||
|
||||
(define-condition type-error (error)
|
||||
((datum :INITARG :DATUM :READER type-error-datum)
|
||||
(expected-type :INITARG :EXPECTED-TYPE :READER type-error-expected-type))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue