From: Raimondas Kiveris

Subject: Run-shell-command, timeout and multiprocessing

Date: 2000-12-18 13:24


I have following problem: 

I have to use run-shell-command in a multithreaded application.
Run-shell-command with :wait t apparently suspends all other 
threads and if external process takes significant time to complete
the whole application practically hangs. 

What I am looking for is a way to apply timeout to run-shell-command. 

mp:with-timeout unfortunately does not work:

USER(33): (time (mp:with-timeout (2 :timed-out) (excl:run-shell-command
"sleep 10")))
; cpu time (non-gc) 0 msec user, 0 msec system
; cpu time (gc)     0 msec user, 0 msec system
; cpu time (total)  0 msec user, 0 msec system
>>> ; real time 10,035 msec <<<
; space allocation: ; 100 cons cells, 0 symbols, 0 other bytes, 0 static bytes :TIMED-OUT Tried this with ACL 5 and 6 on Linux and Solaris. Any suggestions? rkv