mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-21 14:49:18 +02:00
execute and related functions accept symbol and number arguments.
This commit is contained in:
parent
e88374275d
commit
347db3fb7d
2 changed files with 8 additions and 1 deletions
|
@ -47,6 +47,13 @@
|
|||
(not (car o))
|
||||
(equal? (car o) (car cmdline))))))
|
||||
|
||||
(define (execute cmd args)
|
||||
(define (->string x)
|
||||
(cond ((symbol? x) (symbol->string x))
|
||||
((number? x) (number->string x))
|
||||
(else x)))
|
||||
(execvp (->string cmd) (map ->string args)))
|
||||
|
||||
(define (system cmd . args)
|
||||
(let ((pid (fork)))
|
||||
(cond
|
||||
|
|
|
@ -127,7 +127,7 @@
|
|||
;;> Replace the current process with the given command. Finalizers
|
||||
;;> are not run.
|
||||
|
||||
(define-c int (execute execvp) (string (array string)))
|
||||
(define-c int (execvp execvp) (string (array string)))
|
||||
|
||||
;;> Returns the current process id.
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue