gst-remote --kill with Iliad loaded

Tagged:
Project:GNU Smalltalk
Component:Base classes
Category:bug
Priority:normal
Assigned:Unassigned
Status:active
Description

When stopping gst-remote with Iliad loaded and started with --kill option, I get the following stacktrace:

SystemExceptions.FileError(Exception)>>activateHandler: (ExcHandling.st:516)
SystemExceptions.FileError(Exception)>>pass (ExcHandling.st:385)
optimized [] in UndefinedObject>>executeStatements (/usr/local/share/smalltalk/scripts/Remote.st:219)
SystemExceptions.FileError(Exception)>>activateHandler: (ExcHandling.st:516)
SystemExceptions.FileError(Exception)>>signal (ExcHandling.st:254)
SystemExceptions.FileError class(Exception class)>>signal: (ExcHandling.st:161)
File class>>checkError: (File.st:85)
optimized [] in Sockets.AbstractSocketImpl>>ensureReadable (Sockets.star#VFS.ZipFile/AbstractSocketImpl.st:442)
BlockClosure>>ensure: (BlkClosure.st:269)
optimized [] in Sockets.AbstractSocketImpl>>ensureReadable (Sockets.star#VFS.ZipFile/AbstractSocketImpl.st:428)
Sockets.TCPSocketImpl(Sockets.AbstractSocketImpl)>>fileOp:with:ifFail: (Sockets.star#VFS.ZipFile/AbstractSocketImpl.st:151)
Sockets.TCPSocketImpl(Sockets.AbstractSocketImpl)>>ensureReadable (Sockets.star#VFS.ZipFile/AbstractSocketImpl.st:441)
Sockets.ServerSocket>>waitForConnection (Sockets.star#VFS.ZipFile/Sockets.st:974)
optimized [] in UndefinedObject>>executeStatements (/usr/local/share/smalltalk/scripts/Remote.st:214)
BlockClosure>>on:do: (BlkClosure.st:193)
optimized [] in UndefinedObject>>executeStatements (/usr/local/share/smalltalk/scripts/Remote.st:215)
BlockClosure>>repeat (BlkClosure.st:318)
optimized [] in UndefinedObject>>executeStatements (/usr/local/share/smalltalk/scripts/Remote.st:203)
BlockClosure>>on:do: (BlkClosure.st:193)
optimized [] in UndefinedObject>>executeStatements (/usr/local/share/smalltalk/scripts/Remote.st:244)
[] in Process>>onBlock:at:suspend: (Process.st:392)
BlockClosure>>on:do: (BlkClosure.st:193)
[] in Process>>onBlock:at:suspend: (Process.st:393)
BlockClosure>>ensure: (BlkClosure.st:269)
[] in Process>>onBlock:at:suspend: (Process.st:370)
[] in BlockClosure>>asContext: (BlkClosure.st:179)
BlockContext class>>fromClosure:parent: (BlkContext.st:68)

Updates

#1 submitted by Paolo Bonzini on Mon, 05/24/2010 - 06:31

Have you tried with the patch that we discussed on IRC?

#2 submitted by Nicolas Petton on Sat, 07/31/2010 - 10:38

no, sorry, I lost it :/

Do you still have it somewhere?

#3 submitted by Paolo Bonzini on Sat, 07/31/2010 - 11:27

diff --git a/scripts/Remote.st b/scripts/Remote.st
index 83ad0ee..3bbd6bc 100644
--- a/scripts/Remote.st
+++ b/scripts/Remote.st
@@ -210,10 +210,13 @@ server ifTrue: [
             [
                 | conn |
                 [
-                    queue waitForConnection.
-                    (conn := queue accept) isNil
+                    [ queue waitForConnection.
+                      (conn := queue accept) isNil ]
+                        on: Error do: [ :ex |
+                            queue isOpen
+                                ifFalse: [ Processor activeProcess terminate ]
+                                ifTrue: [ex pass ] ].
                 ] whileTrue: [
-                    queue isOpen ifFalse: [ Processor activeProcess terminate ].
                     Processor yield
                 ].
                 [

User login