Commit e6550bec authored by Robert Goldman's avatar Robert Goldman

Merge branch 'run-program-messy-with-rebasing' into 'master'

%run-program: Overhaul of asynchronous process spawning

The primary changes made in this branch can be summarised as follows:
 - Employ parameter-error and not-implemented-error
 - Add and use process-info class with a few corresponding getter functions
 - Export functions: process-info-pid, wait-process
 - Add functions: launch-program, close-streams, process-alive-p, terminate-process
 - Unify exit status codes
 - Add tests; unix-specific for now.

See merge request !3
parents efc14379 46eb49bf
#!/bin/sh
if [ $# -gt 3 ]; then
exit 1
fi
if [ $# -ge 2 ]; then
echo $2
fi
if [ $# -ge 3 ]; then
echo $3 >&2
fi
exit ${1:-0}
#!/bin/sh
kill $$
#!/bin/sh
sh -c 'kill $$'
#!/bin/sh
if [ $# -gt 2 ]; then
exit 1
fi
sleep ${2:-0}
exit ${1:-0}
......@@ -175,7 +175,7 @@
(defparameter *mod*
(or
#+abcl :abcl-contrib
#+allegro :yacc
#+allegro :sax
#+clisp (first (remove "asdf" *dynmod-list* :test 'equal))
#+(or clozure cmucl) :defsystem
#+ecl :serve-event ;; loads faster than :ecl-quicklisp
......
This diff is collapsed.
This diff is collapsed.
......@@ -22,6 +22,7 @@
#:read-file-forms #:read-file-form #:safe-read-file-form
#:eval-input #:eval-thunk #:standard-eval-thunk
#:println #:writeln
#:file-stream-p #:file-or-synonym-stream-p
;; Temporary files
#:*temporary-directory* #:temporary-directory #:default-temporary-directory
#:setup-temporary-directory
......@@ -706,3 +707,12 @@ For the latter case, we ought pick a random suffix and atomically open it."
(defmacro with-staging-pathname ((pathname-var &optional (pathname-value pathname-var)) &body body)
"Trivial syntax wrapper for CALL-WITH-STAGING-PATHNAME"
`(call-with-staging-pathname ,pathname-value #'(lambda (,pathname-var) ,@body))))
(with-upgradability ()
(defun file-stream-p (stream)
(typep stream 'file-stream))
(defun file-or-synonym-stream-p (stream)
(or (file-stream-p stream)
(and (typep stream 'synonym-stream)
(file-or-synonym-stream-p
(symbol-value (synonym-stream-symbol stream)))))))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment