summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scsh-process.scm2
-rw-r--r--tests/run.scm4
2 files changed, 3 insertions, 3 deletions
diff --git a/scsh-process.scm b/scsh-process.scm
index 46a107a..96a3bc7 100644
--- a/scsh-process.scm
+++ b/scsh-process.scm
@@ -79,7 +79,7 @@
;; Not needed anymore after duplication is complete.
(file-close (cadr p)))
pipe-pairs from-fds)
- (if thunk (thunk) pid))
+ (if thunk (begin (thunk) (exit 0)) pid))
(begin ; Parent
(for-each (lambda (p to-fd)
;; Close sending end in parent.
diff --git a/tests/run.scm b/tests/run.scm
index 23220e1..207d705 100644
--- a/tests/run.scm
+++ b/tests/run.scm
@@ -9,11 +9,11 @@
(begin (fork/pipe
(lambda ()
(with-output-to-port (open-output-file* 1)
- (lambda () (display "Hello, world.\n") (exit 0)))))
+ (lambda () (display "Hello, world.\n")))))
(read-line (open-input-file* 0))))
(test "run/string* returns a string output in a subprocess"
"This is a test"
- (run/string* (lambda () (display "This is a test") (exit 0)))))
+ (run/string* (lambda () (display "This is a test")))))
(test-group "Macro (EPF) interface"
(delete-file* "outfile") ; Leftovers