The following code hangs on first read-line in 2.44.1, but worked in 2.41 and earlier.
(ext:letf
(((values stream in out)
(EXT:RUN-PROGRAM (format nil "~a/bin/SPASS" user::*root*)
:arguments (list "-Stdin")
:input :stream
:output :stream
))
(rv nil))
(format stream (spass-encoding query))
(ignore-errors
(read-line stream)
(read-line stream)
(setf spass-result (read-line stream))
(setf rv (not (search "Proof" spass-result))))
(close in)
(close out)
(close stream)
rv))
I cannot reproduce this with either the current cvs head or with clisp 2.47:
(ext:letf (((values stream in out) (EXT:RUN-PROGRAM "ls" :input :stream :output :stream))) (print (read-line stream)) (close in) (close out) (close stream))
"ANNOUNCE"
==> T
or simply
(with-open-stream (i (make-pipe-input-stream "ls")) (read-line i))
==> "ANNOUNCE" ; NIL
note that I do not have the SPASS executable,
I do not know what user::*root* should be ("/usr"?)
and I do not have (spass-encoding query).
could you please try to produce a stand-alone test case?
couls you please try a newer clisp?
thanks!
Shalom Sam,
does the following hang the current version? It hangs my 2.44.1 but not 2.41.
(ext:letf
(((values stream in out)
(EXT:RUN-PROGRAM "dc" :input :stream
:output :stream)))
(format stream "3~%5~%p~%")
(format t "~a" (read-line stream))
(close in)
(close out)
(close stream))
I will get after support to update clisp tomorrow.
Regards.
This bug report is now marked as "pending"/"invalid".
This means that we think that the problem you report
is not a problem with CLISP.
Unless you - the reporter - act within 2 weeks,
the bug will be permanently closed.
Sorry about the inconvenience -
we hope your silence means that
you agree that this is not a bug in CLISP.
you need to (finish-output stream) or (force-output stream) before (read-line).
alternatively, use :buffered nil argument when creating streams.
see http://clisp.cons.org/impnotes/open.html#buffered
the latter is NOT recommended because buffering is good for performance.
Thanks Sam,
works like a charm now!
MM
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).