Loading posix/packages.lisp +3 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,7 @@ #:dirfd #:dup #:dup2 #:exit #:fchdir #:fchmod #:fcntl Loading Loading @@ -163,6 +164,8 @@ #:unlink #:unsetenv #:usleep #:wait #:waitpid #:write #:writev Loading posix/unix.lisp +25 −0 Original line number Diff line number Diff line Loading @@ -133,6 +133,31 @@ (defsyscall "fork" pid "Create a child process.") (defsyscall "exit" :int "Exit a process immediately." (code :int)) (defcfun ("wait" %wait) pid (stat-loc :pointer)) (defun wait () "Wait for any child process to terminate." (with-foreign-object (stat-loc :int) (let ((result (%wait stat-loc))) (values result (mem-ref stat-loc :int))))) (defcfun ("waitpid" %waitpid) pid (pid pid) (stat-loc :pointer) (options :int)) (defun waitpid (pid &key (no-hang nil) (untraced nil)) "Wait for a specific child process to terminate" (with-foreign-object (stat-loc :int) (let ((result (%waitpid pid stat-loc (logior (if no-hang wnohang 0) (if untraced wuntraced 0))))) (values result (mem-ref stat-loc :int))))) (defsyscall "getegid" gid "Get effective group id of the current process.") Loading posix/unixint.lisp +5 −0 Original line number Diff line number Diff line Loading @@ -632,3 +632,8 @@ (constant (tiocghayesesp "TIOCGHAYESESP")) (constant (tiocshayesesp "TIOCSHAYESESP")) (constant (fioqsize "FIOQSIZE"))) ;;;; from wait.h (constant (wnohang "WNOHANG")) (constant (wuntraced "WUNTRACED")) Loading
posix/packages.lisp +3 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,7 @@ #:dirfd #:dup #:dup2 #:exit #:fchdir #:fchmod #:fcntl Loading Loading @@ -163,6 +164,8 @@ #:unlink #:unsetenv #:usleep #:wait #:waitpid #:write #:writev Loading
posix/unix.lisp +25 −0 Original line number Diff line number Diff line Loading @@ -133,6 +133,31 @@ (defsyscall "fork" pid "Create a child process.") (defsyscall "exit" :int "Exit a process immediately." (code :int)) (defcfun ("wait" %wait) pid (stat-loc :pointer)) (defun wait () "Wait for any child process to terminate." (with-foreign-object (stat-loc :int) (let ((result (%wait stat-loc))) (values result (mem-ref stat-loc :int))))) (defcfun ("waitpid" %waitpid) pid (pid pid) (stat-loc :pointer) (options :int)) (defun waitpid (pid &key (no-hang nil) (untraced nil)) "Wait for a specific child process to terminate" (with-foreign-object (stat-loc :int) (let ((result (%waitpid pid stat-loc (logior (if no-hang wnohang 0) (if untraced wuntraced 0))))) (values result (mem-ref stat-loc :int))))) (defsyscall "getegid" gid "Get effective group id of the current process.") Loading
posix/unixint.lisp +5 −0 Original line number Diff line number Diff line Loading @@ -632,3 +632,8 @@ (constant (tiocghayesesp "TIOCGHAYESESP")) (constant (tiocshayesesp "TIOCSHAYESESP")) (constant (fioqsize "FIOQSIZE"))) ;;;; from wait.h (constant (wnohang "WNOHANG")) (constant (wuntraced "WUNTRACED"))