Commit ee61d0a9 authored by Elias Pipping's avatar Elias Pipping

Fix indentation

Whitespace changes were intentionally left out of the previous commit
to keep it readable.
parent 0b941309
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment