[Git][cmucl/cmucl][master] 2 commits: Fix #44: Add docstrings for process accessors

Raymond Toy rtoy at common-lisp.net
Sat Sep 16 23:30:02 UTC 2017


Raymond Toy pushed to branch master at cmucl / cmucl


Commits:
ec29ec51 by Raymond Toy at 2017-09-16T15:23:32-07:00
Fix #44: Add docstrings for process accessors

Adds docstrings for the exported process accessors:
`process-pid`, `process-exit-code`, `process-core-dumped`,
`process-pty`, `process-input`, `process-output`, `process-error`,
`process-status-hook`, `process-plist`.

- - - - -
f99b8125 by Raymond Toy at 2017-09-16T23:29:58+00:00
Merge branch 'rtoy-fix-44-add-docstrings-process' into 'master'

Fix #44: Add docstrings for process accessors

Closes #44

See merge request !24
- - - - -


1 changed file:

- src/code/run-program.lisp


Changes:

=====================================
src/code/run-program.lisp
=====================================
--- a/src/code/run-program.lisp
+++ b/src/code/run-program.lisp
@@ -75,8 +75,8 @@
 ;;; PROCESS-STATUS -- Public.
 ;;;
 (defun process-status (proc)
-  "Return the current status of process.  The result is one of :running,
-   :stopped, :exited, :signaled."
+  "Return the current status of process.  The result is one of
+  :running,:stopped, :continued, :exited, :signaled."
   (declare (type process proc))
   (get-processes-status-changes)
   (process-%status proc))
@@ -99,6 +99,32 @@
     (system:serve-all-events 1))
   proc)
 
+;;; Add docstrings for the other public PROCESS accessors.
+(setf (documentation 'process-pid 'function)
+  _N"PID of child process.")
+(setf (documentation 'process-exit-code 'function)
+  _N"Exit code for the process if it is :exited; the termination signal
+  if it is :signaled; 0 if it is :stopped.  It is undefined in all
+  other cases.")
+(setf (documentation 'process-core-dumped 'function)
+  _N"Non-NIL if the process was terminated and a core image was dumped.")
+(setf (documentation 'process-pty 'function)
+  _N"The two-way stream connected to the child's Unix pty connection or NIL.")
+(setf (documentation 'process-input 'function)
+  _N"Stream to child's input or NIL.")
+(setf (documentation 'process-output 'function)
+  _N"Stream from child's output or NIL.")
+(setf (documentation 'process-error 'function)
+  _N"Stream from child's error output or NIL.")
+(setf (documentation 'process-status-hook 'function)
+  _N"The function to be called whenever process's changes status. This
+  function takes the process as a required argument.  This is
+  setf'able.")
+(setf (documentation 'process-plist 'function)
+  _N"Returns annotations supplibed by users; it is setf'able. This is
+  available for users to associcate information with the process
+  without having to build a-lists or hash tables of process
+  structures.")
 
 #-hpux
 ;;; FIND-CURRENT-FOREGROUND-PROCESS -- internal



View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/compare/e1f12db958ab0af954c377a5bccf69a206ea25b1...f99b81251a46e8e06c4e40e5136f4d5744dd8de8

---
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/compare/e1f12db958ab0af954c377a5bccf69a206ea25b1...f99b81251a46e8e06c4e40e5136f4d5744dd8de8
You're receiving this email because of your account on gitlab.common-lisp.net.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cmucl-cvs/attachments/20170916/0290d60f/attachment-0001.html>


More information about the cmucl-cvs mailing list