On restart, set the file port to unbuffered mode before seeking to
work around scsh limitiation.
This commit is contained in:
parent
b7314f87f1
commit
a65dbd70e4
|
@ -1089,8 +1089,16 @@
|
|||
(lambda (restart-position)
|
||||
(log (syslog-level debug) "clearing RESTART position")
|
||||
(set-the-session-restart-position! #f)
|
||||
(if (not (zero? restart-position))
|
||||
(begin
|
||||
;; scsh can seek on unbuffered ports only
|
||||
(set-port-buffering file-port bufpol/none)
|
||||
(seek file-port restart-position)
|
||||
(log (syslog-level debug) "seeking for RESTART successful"))))
|
||||
(log (syslog-level debug)
|
||||
"seeking for RESTART at position ~A successful"
|
||||
restart-position))
|
||||
(log (syslog-level debug)
|
||||
"Position is 0, no seek necessary")))))
|
||||
(with-data-connection
|
||||
(lambda ()
|
||||
(case (the-session-type)
|
||||
|
@ -1151,8 +1159,16 @@
|
|||
(lambda (restart-position)
|
||||
(log (syslog-level debug) "clearing RESTART position")
|
||||
(set-the-session-restart-position! #f)
|
||||
(if (not (zero? restart-position))
|
||||
(begin
|
||||
;; scsh can seek on unbuffered ports only
|
||||
(set-port-buffering file-port bufpol/none)
|
||||
(seek file-port restart-position)
|
||||
(log (syslog-level debug) "seeking for RESTART successful"))))
|
||||
(log (syslog-level debug)
|
||||
"seeking for RESTART at position ~A successful"
|
||||
restart-position))
|
||||
(log (syslog-level debug)
|
||||
"Position is 0, no seek necessary")))))
|
||||
(with-data-connection
|
||||
(lambda ()
|
||||
(let ((inport (socket:inport (the-session-data-socket))))
|
||||
|
|
Loading…
Reference in New Issue