-(sb-alien:def-alien-routine spawn sb-c-call:int
- (program sb-c-call:c-string)
- (argv (* sb-c-call:c-string))
- (envp (* sb-c-call:c-string))
- (pty-name sb-c-call:c-string)
- (stdin sb-c-call:int)
- (stdout sb-c-call:int)
- (stderr sb-c-call:int))
+(sb-alien:define-alien-routine spawn sb-alien:int
+ (program sb-alien:c-string)
+ (argv (* sb-alien:c-string))
+ (envp (* sb-alien:c-string))
+ (pty-name sb-alien:c-string)
+ (stdin sb-alien:int)
+ (stdout sb-alien:int)
+ (stderr sb-alien:int))
+
+;;; Is UNIX-FILENAME the name of a file that we can execute?
+;;; XXX does this actually work for symlinks?
+(defun unix-filename-is-executable-p (unix-filename)
+ (declare (type simple-string unix-filename))
+ (values (and (eq (sb-unix:unix-file-kind unix-filename) :file)
+ (sb-unix:unix-access unix-filename sb-unix:x_ok))))