111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
(loop (+ i 1)))
(values pid-val exit-status exit-code))))))
;;======================================================================
;; MISC PROCESS RELATED STUFF
;;======================================================================
(define (children proc)
(with-input-from-pipe
(conc "ps h --ppid " (current-process-id) " -o pid")
(lambda ()
(let loop ((inl (read-line))
(res '()))
(if (eof-object? inl)
(reverse res)
|
|
|
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
(loop (+ i 1)))
(values pid-val exit-status exit-code))))))
;;======================================================================
;; MISC PROCESS RELATED STUFF
;;======================================================================
(define (process:children proc)
(with-input-from-pipe
(conc "ps h --ppid " (current-process-id) " -o pid")
(lambda ()
(let loop ((inl (read-line))
(res '()))
(if (eof-object? inl)
(reverse res)
|