Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asdf
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jan Moringen
asdf
Commits
2966e9a4
Commit
2966e9a4
authored
Oct 25, 2016
by
Robert Goldman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Comments for %HANDLE-IF-EXISTS/DOES-NOT-EXIST.
No changes to code, just some notes for the reader.
parent
72670360
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
uiop/run-program.lisp
uiop/run-program.lisp
+10
-0
No files found.
uiop/run-program.lisp
View file @
2966e9a4
...
...
@@ -426,6 +426,14 @@ argument to pass to the internal RUN-PROGRAM"
;; >128 from exiting in response to a signal by setting this code
(
signal-code
:initform
nil
)))
;;;---------------------------------------------------------------------------
;;; The following two helper functions take care of handling the IF-EXISTS and
;;; IF-DOES-NOT-EXIST arguments for RUN-PROGRAM. In particular, they process the
;;; :ERROR, :APPEND, and :SUPERSEDE arguments *here*, allowing the master
;;; function to treat input and output files unconditionally for reading and
;;; writing.
;;;---------------------------------------------------------------------------
(
defun
%handle-if-exists
(
file
if-exists
)
(
when
(
or
(
stringp
file
)
(
pathnamep
file
))
(
ecase
if-exists
...
...
@@ -520,6 +528,7 @@ LAUNCH-PROGRAM returns a PROCESS-INFO object."
(
list
input
output
error-output
))
(
parameter-error
"~S: Streams passed as I/O parameters need to be (synonymous with) file streams on this lisp"
'launch-program
))
;; see comments for these functions
(
%handle-if-does-not-exist
input
if-input-does-not-exist
)
(
%handle-if-exists
output
if-output-exists
)
(
%handle-if-exists
error-output
if-error-output-exists
)
...
...
@@ -992,6 +1001,7 @@ or :error-output."
&allow-other-keys
)
"A portable abstraction of a low-level call to libc's system()."
(
declare
(
ignorable
directory
keys
))
;; see comments for these functions
(
%handle-if-does-not-exist
input
if-input-does-not-exist
)
(
%handle-if-exists
output
if-output-exists
)
(
%handle-if-exists
error-output
if-error-output-exists
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment