Revision: 10648 http://pure-data.svn.sourceforge.net/pure-data/?rev=10648&view=rev Author: eighthave Date: 2009-01-26 05:27:12 +0000 (Mon, 26 Jan 2009)
Log Message: ----------- added check for eof so that pd-gui will exit once pd drops the socket connection
Modified Paths: -------------- branches/pd-devel/0.41.4/src/pd_connect.tcl
Modified: branches/pd-devel/0.41.4/src/pd_connect.tcl =================================================================== --- branches/pd-devel/0.41.4/src/pd_connect.tcl 2009-01-26 04:47:09 UTC (rev 10647) +++ branches/pd-devel/0.41.4/src/pd_connect.tcl 2009-01-26 05:27:12 UTC (rev 10648) @@ -61,6 +61,11 @@ # TODO this currently drops leading whitespace, like tabs proc ::pd_connect::pd_readsocket {cmd_from_pd} { variable pd_socket + if {[eof $pd_socket]} { + # if we lose the socket connection, that means pd quit + close $pd_socket + exit + } append cmd_from_pd [read $pd_socket] puts stderr "cmd_from_pd: $cmd_from_pd" if {[catch {uplevel #0 $cmd_from_pd} errorname]} {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.