mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
Merge branch 'master' of github.com:ashinn/chibi-scheme
This commit is contained in:
commit
af686a8b50
3 changed files with 20 additions and 5 deletions
|
@ -6,6 +6,7 @@
|
|||
(test-begin "processes")
|
||||
(test #t (process-running? (current-process-id)))
|
||||
(test #t (process-running? (parent-process-id)))
|
||||
(test #f (process-running? -1))
|
||||
(test #f (signal-set-contains? (current-signal-mask) signal/alarm))
|
||||
(test #t (signal-set? (make-signal-set)))
|
||||
(test #t (signal-set? (current-signal-mask)))
|
||||
|
|
|
@ -83,8 +83,14 @@ static sexp sexp_pid_cmdline (sexp ctx, int pid) {
|
|||
int id = KERN_PROC;
|
||||
#endif
|
||||
size_t reslen = sizeof(res);
|
||||
#if defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
int name[6] = {CTL_KERN, id, KERN_PROC_PID, pid, reslen, 1};
|
||||
unsigned namelen = 6;
|
||||
#else
|
||||
int name[4] = {CTL_KERN, id, KERN_PROC_PID, pid};
|
||||
if (sysctl(name, 4, &res, &reslen, NULL, 0) >= 0) {
|
||||
unsigned namelen = 4;
|
||||
#endif
|
||||
if (sysctl(name, namelen, &res, &reslen, NULL, 0) >= 0 && reslen > 0) {
|
||||
#if defined(__APPLE__)
|
||||
return sexp_c_string(ctx, res.kp_proc.p_comm, -1);
|
||||
#elif defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
(define known-implementations
|
||||
'((chibi "chibi-scheme" (chibi-scheme -V) "0.7.3")
|
||||
(chicken "chicken" (csi -p "(chicken-version)") "4.9.0")
|
||||
(chicken "chicken" (csi -release) "4.9.0")
|
||||
(cyclone "cyclone" (icyc -vn) "0.5.3")
|
||||
(foment "foment")
|
||||
(gauche "gosh" (gosh -E "print (gauche-version)" -E exit) "0.9.4")
|
||||
|
@ -1287,6 +1287,16 @@
|
|||
(string->number (process->string '(csi -p "(##sys#fudge 42)")))
|
||||
8))
|
||||
|
||||
(define (get-chicken-repo-path)
|
||||
(let ((release (string-trim (process->string '(csi -release))
|
||||
char-whitespace?)))
|
||||
(string-trim
|
||||
(if (string-prefix? "4." release)
|
||||
(process->string '(csi -p "(repository-path)"))
|
||||
(process->string
|
||||
'(csi -R chicken.platform -p "(car (repository-path))")))
|
||||
char-whitespace?)))
|
||||
|
||||
(define (get-install-dirs impl cfg)
|
||||
(define (guile-eval expr)
|
||||
(guard (exn (else #f))
|
||||
|
@ -1304,9 +1314,7 @@
|
|||
(cons share-dir (delete share-dir dirs))
|
||||
dirs)))
|
||||
((chicken)
|
||||
(let ((dir (string-trim
|
||||
(process->string '(csi -p "(repository-path)"))
|
||||
char-whitespace?)))
|
||||
(let ((dir (get-chicken-repo-path)))
|
||||
(list
|
||||
(if (file-exists? dir) ; repository-path should always exist
|
||||
dir
|
||||
|
|
Loading…
Add table
Reference in a new issue