-
Notifications
You must be signed in to change notification settings - Fork 7
/
package.lisp
41 lines (38 loc) · 922 Bytes
/
package.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
(in-package #:common-lisp-user)
(defpackage #:trivial-shell
(:use #:common-lisp #:com.metabang.trivial-timeout)
(:nicknames #:com.metabang.trivial-shell #:metashell)
(:export
#:shell-command
#:with-timeout
#:get-env-var
#:exit
#:*bourne-compatible-shell*
#:*shell-search-paths*
;; conditions
#:timeout-error
#:timeout-error-command))
(eval-when (:compile-toplevel :load-toplevel :execute)
(import
#+allegro
'(mp:process-wait-with-timeout)
#+clisp
'()
#+(and cmu mp)
'(mp:process-wait-with-timeout)
#+(and cmu (not mp))
'()
#+cormanlisp
'()
#+digitool
'(ccl:process-wait-with-timeout)
#+lispworks
'(mp:process-wait-with-timeout)
#+(or openmcl ccl)
'(ccl:process-wait-with-timeout)
#+(and sbcl sb-threads)
'(sb-threads:make-semaphore
sb-threads:signal-semaphore)
#+(and sbcl (not sb-threads))
'()
'#:trivial-shell))