execute and related functions accept symbol and number arguments.

This commit is contained in:
Alex Shinn 2014-06-08 16:15:58 +09:00
parent e88374275d
commit 347db3fb7d
2 changed files with 8 additions and 1 deletions

View file

@ -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

View file

@ -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.