Overview
Comment: | Added exit on issue launching cmd |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
62d813cd5f0e958561036d0a05cc0b19 |
User & Date: | matt on 2011-07-12 00:24:30 |
Other Links: | manifest | tags |
Context
2011-07-12
| ||
23:47 | Merged run-launch-cleanup into trunk check-in: 70aaddfbce user: matt tags: trunk | |
16:55 | Refactor launch and run code check-in: 1d078c2e7b user: mrwellan tags: run-launch-cleanup | |
00:24 | Added exit on issue launching cmd check-in: 62d813cd5f user: matt tags: trunk | |
2011-07-11
| ||
11:18 | Merged debug-printing into trunk check-in: bcc1c96231 user: mrwellan tags: trunk | |
Changes
Modified launch.scm from [4996324b33] to [fb3d7cd32a].
︙ | ︙ | |||
179 180 181 182 183 184 185 186 187 188 189 | (list "MT_RUNNAME" (args:get-arg ":runname"))) itemdat))) (launch-results (apply cmd-run-proc-each-line (car fullcmd) print (cdr fullcmd)))) ;; launcher fullcmd)));; (apply cmd-run-proc-each-line launcher print fullcmd))) ;; (cmd-run->list fullcmd)) (debug:print 2 "Launching completed, updating db") (alist->env-vars miscprevvals) (alist->env-vars testprevvals) (alist->env-vars commonprevvals)))) | > > > > > | 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 | (list "MT_RUNNAME" (args:get-arg ":runname"))) itemdat))) (launch-results (apply cmd-run-proc-each-line (car fullcmd) print (cdr fullcmd)))) ;; launcher fullcmd)));; (apply cmd-run-proc-each-line launcher print fullcmd))) ;; (cmd-run->list fullcmd)) (debug:print 2 "Launching completed, updating db") (debug:print 4 "Launch results: " launch-results) (if (not launch-results) (begin (print "ERROR: Failed to run " fullcmd ", exiting now") (exit 1))) (alist->env-vars miscprevvals) (alist->env-vars testprevvals) (alist->env-vars commonprevvals)))) |
Modified process.scm from [d31db054ad] to [678870658d].
︙ | ︙ | |||
10 11 12 13 14 15 16 | ;;====================================================================== ;;====================================================================== ;; Process convience utils ;;====================================================================== (define (cmd-run-proc-each-line cmd proc . params) | > > > > > | | | | | | | | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | ;;====================================================================== ;;====================================================================== ;; Process convience utils ;;====================================================================== (define (cmd-run-proc-each-line cmd proc . params) (handle-exceptions exn (begin (print "ERROR: Failed to run command: " cmd (string-intersperse params " ")) #f) (let* ((fh (process cmd params))) (let loop ((curr (read-line fh)) (result '())) (if (not (eof-object? curr)) (loop (read-line fh) (append result (list (proc curr)))) result))))) (define (cmd-run-proc-each-line-alt cmd proc) (let* ((fh (open-input-pipe cmd)) (res (port-proc->list fh proc)) (status (close-input-pipe fh))) (if (eq? status 0) res #f))) |
︙ | ︙ |