process-ls pasted by mdhughes on Sun Oct 13 05:59:30 2019

(let-values (( (inpipe outpipe) (make-textual-pipe) ))
	(let ( (proc (make-process (list 'stdin inpipe 'stdout outpipe) "ls" "-1"))  (s "") )
		(let loop ()
			(let ( (s (read-line port)) )
				(when (not (eof-object? s))
					(display s)
					(loop) ) ) ) ) )

simpler process-ls added by mdhughes on Sun Oct 13 06:26:14 2019

;; Move command line to a single list up front, options as alist after
;; Sensible defaults: Creates stdin/stdout/stderr pipes, stores them in process object
;; Should error on non-zero exit unless keep-errors option is set
(let ( (proc (make-process '("ls" "-1")  '() )) )
	(let loop ()
		(let ( (s (read-line (process-stdout proc))) )
			(when (not (eof-object? s))
				(display s) (newline)
				(loop) ) ) ) )