mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-23 13:01:42 -08:00
tests: run-program: add status-hook tests
This commit is contained in:
parent
afad65bcc6
commit
135a43a027
1 changed files with 15 additions and 0 deletions
|
|
@ -134,3 +134,18 @@
|
|||
(is-not (zerop (length (get-output-stream-string output-stream))))
|
||||
(is-not (zerop (length (get-output-stream-string error-stream))))
|
||||
(mapc #'close (list output-stream error-stream))))
|
||||
|
||||
|
||||
#-windows
|
||||
(test sigchld-handler
|
||||
(let ((x 0))
|
||||
(flet ((status-hook (process)
|
||||
(incf x)))
|
||||
(with-run-program (heartbeat nil :status-hook #'status-hook)
|
||||
(si:killpid (ext:external-process-pid process) ext:+sigstop+)
|
||||
(sleep 1)
|
||||
(si:killpid (ext:external-process-pid process) ext:+sigcont+)
|
||||
(sleep 1)
|
||||
(ext:terminate-process process)
|
||||
(sleep 1))
|
||||
(is (= x 3) "X is ~s, should be 3." x))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue