scsh-users
[Top] [All Lists]

Re: sunet(FTP) not working (Interrupted system call).

To: mmc@maruska.dyndns.org (Michal Maruška)
Subject: Re: sunet(FTP) not working (Interrupted system call).
From: Eric Marsden <emarsden@laas.fr>
Date: Sun, 17 Mar 2002 17:44:29 +0100
Cc: scsh-news <scsh-news@zurich.ai.mit.edu>
Organization: LAAS-CNRS http://www.laas.fr/
Sender: Eric Marsden <emarsden@melbourne.laas.fr>
>>>>> "mm" == Michal Maruška <mmc@maruska.dyndns.org> writes:

  mm> <- RETR robots.txt
  mm> -> 150 Opening BINARY mode data connection for robots.txt (242 bytes).
  mm> -> 426 Data connection: Interrupted system call.
  mm> 
  mm> stderr:
  mm> "426 Data connection: Interrupted system call.

this looks like a problem in scsh: it should be retrying the system
call when it receives a return value of EINTR. However, there is a bug
in ftp.scm; please try the following patch.

Index: ftp.scm
===================================================================
RCS file: /cvsroot/sunet/sunet/ftp.scm,v
retrieving revision 1.3
diff -c -u -r1.3 ftp.scm
cvs server: conflicting specifications of output style
--- ftp.scm     12 Feb 2002 11:47:13 -0000      1.3
+++ ftp.scm     17 Mar 2002 16:42:29 -0000
@@ -402,10 +402,10 @@
              (accept-connection sock)
              (with-current-output-port OUT
                 (dump (socket:inport newsock)))
+             (close-socket newsock)
+             (close-socket sock)
              (let ((status (ftp:read-response connection "2..")))
                (if (string? local) (close OUT))
-               (close-socket newsock)
-               (close-socket sock)
                (if (eq? local #f)
                    (string-output-port-output OUT)
                    status)))))

  
  mm> ** on a host which is behind NAT/masquerade (yes, the manual
  mm> warns against it, just for curiosity):
  mm> log:
  mm> <- PORT 192,168,2,3,198,38
  mm> -> 421 Timeout (900 seconds): closing control connection.
  mm> <- RETR robots.txt
  mm> -> #{End-of-file}
  mm> 
  mm> stderr:
  mm> Error: invalid argument
  mm> (#{Procedure 9200 (regexp-match in posix-regexps)} '#{Regexp} 
'#{End-of-file} #f #f)

the timeout and EOF are to be expected in this situation. The error
handling in ftp.scm could be improved, I agree. 
  
-- 
Eric Marsden                          <URL:http://www.laas.fr/~emarsden/>

<Prev in Thread] Current Thread [Next in Thread>