Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
asdf
asdf
Commits
ee61d0a9
Commit
ee61d0a9
authored
Sep 09, 2016
by
Elias Pipping
Browse files
Fix indentation
Whitespace changes were intentionally left out of the previous commit to keep it readable.
parent
0b941309
Changes
1
Hide whitespace changes
Inline
Side-by-side
uiop/run-program.lisp
View file @
ee61d0a9
...
...
@@ -740,34 +740,34 @@ It returns a process-info object."
input
:keys
keys
:stream-easy-p
t
:active
(
eq
activity
:input
))
(
setf
process-info
(
apply
'%run-program
command
:wait
wait
:input
reduced-input
:output
reduced-output
:error-output
(
if
(
eq
error-output
:output
)
:output
reduced-error-output
)
keys
))
(
labels
((
get-stream
(
stream-name
&optional
fallbackp
)
(
or
(
slot-value
process-info
stream-name
)
(
when
fallbackp
(
slot-value
process-info
'bidir-stream
))))
(
run-activity
(
activity
stream-name
&optional
fallbackp
)
(
if-let
(
stream
(
get-stream
stream-name
fallbackp
))
(
funcall
activity
stream
)
(
error
'subprocess-error
:code
`
(
:missing
,
stream-name
)
:command
command
:process
process-info
))))
(
unwind-protect
(
ecase
activity
((
nil
))
(
:input
(
run-activity
input-activity
'input-stream
t
))
(
:output
(
run-activity
output-activity
'output-stream
t
))
(
:error-output
(
run-activity
error-output-activity
'error-output-stream
)))
(
dolist
(
stream
(
cons
(
slot-value
process-info
'error-output-stream
)
(
if-let
(
bidir-stream
(
slot-value
process-info
'bidir-stream
))
(
list
bidir-stream
)
(
list
(
slot-value
process-info
'input-stream
)
(
slot-value
process-info
'output-stream
)))))
(
when
stream
(
close
stream
)))
(
setf
exit-code
(
%wait-process-result
process-info
)))))))
(
apply
'%run-program
command
:wait
wait
:input
reduced-input
:output
reduced-output
:error-output
(
if
(
eq
error-output
:output
)
:output
reduced-error-output
)
keys
))
(
labels
((
get-stream
(
stream-name
&optional
fallbackp
)
(
or
(
slot-value
process-info
stream-name
)
(
when
fallbackp
(
slot-value
process-info
'bidir-stream
))))
(
run-activity
(
activity
stream-name
&optional
fallbackp
)
(
if-let
(
stream
(
get-stream
stream-name
fallbackp
))
(
funcall
activity
stream
)
(
error
'subprocess-error
:code
`
(
:missing
,
stream-name
)
:command
command
:process
process-info
))))
(
unwind-protect
(
ecase
activity
((
nil
))
(
:input
(
run-activity
input-activity
'input-stream
t
))
(
:output
(
run-activity
output-activity
'output-stream
t
))
(
:error-output
(
run-activity
error-output-activity
'error-output-stream
)))
(
dolist
(
stream
(
cons
(
slot-value
process-info
'error-output-stream
)
(
if-let
(
bidir-stream
(
slot-value
process-info
'bidir-stream
))
(
list
bidir-stream
)
(
list
(
slot-value
process-info
'input-stream
)
(
slot-value
process-info
'output-stream
)))))
(
when
stream
(
close
stream
)))
(
setf
exit-code
(
%wait-process-result
process-info
)))))))
(
%check-result
exit-code
:command
command
:process
process-info
:ignore-error-status
ignore-error-status
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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