This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

read bug in 1.3


I have found a few other messages in the archive complaining about the
same problem, but I couldn't find any that offers a solution.
Basically the problem seems to be that read and read-line do not work
with pipes even though they work with files.  Can you help us solve
this problem?

% cat /tmp/test
(+ 1 2)

% guile -c '(write-line (read))' < /tmp/test
(+ 1 2)

% cat /tmp/test | guile -c '(write-line (read))'
ERROR: In procedure read in expression (read):
ERROR: end of file in 

% guile -c '(write-line (read-line))' < /tmp/test
(+ 1 2)

% cat /tmp/test | guile -c '(write-line (read-line))'
Abort

% sysinfo
Kernel Version is        SunOS Release 5.5.1 Version Generic [UNIX(R)
System V Release 4.0]

% ldd /usr/local/bin/guile
	libguile.so.4 =>	 /usr/local/lib/libguile.so.4
	libdl.so.1 =>	 /usr/lib/libdl.so.1
	libsocket.so.1 =>	 /usr/lib/libsocket.so.1
	libnsl.so.1 =>	 /usr/lib/libnsl.so.1
	libm.so.1 =>	 /usr/lib/libm.so.1
	libc.so.1 =>	 /usr/lib/libc.so.1
	libintl.so.1 =>	 /usr/lib/libintl.so.1
	libmp.so.1 =>	 /usr/lib/libmp.so.1
	libw.so.1 =>	 /usr/lib/libw.so.1

% ls -l /usr/local/lib | grep readline
-rw-r--r--   1 deniz      669646 Feb  3 17:07 libreadline.a
lrwxrwxrwx   1 deniz          18 Feb  3 17:41 libreadline.so.3 -> libreadline.so.3.0
-rw-r--r--   1 deniz      363691 Feb  3 17:08 libreadline.so.3.0