[Ecls-list] RUN-PROCESS with input from string.

Rupert Swarbrick rswarbrick at gmail.com
Sun Feb 27 01:26:45 UTC 2011


Hi there,

I'm busy trying to port some website code to work with ECL as well as
SBCL. To do so, I'm trying to write a function that will create a
process with a given string as standard input. On sbcl, I'd do the
following:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-common-lisp
Size: 78 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20110227/bc1e7584/attachment.bin>
-------------- next part --------------

and that works fine: the program runs, reading from the string and then
exits. After thinking for a bit, I came up with the following code to
try to get things working with ecl:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-common-lisp
Size: 291 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20110227/bc1e7584/attachment-0001.bin>
-------------- next part --------------

where /home/rupert/doit.sh contains the following:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-sh
Size: 39 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20110227/bc1e7584/attachment.sh>
-------------- next part --------------

This works, in that tmp.txt contains blargl after the code runs, but the
process never finishes:

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: not available
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20110227/bc1e7584/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: not available
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20110227/bc1e7584/attachment-0001.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 315 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20110227/bc1e7584/attachment.sig>


More information about the ecl-devel mailing list