1. Crossed fingers, got rid of the instabilities caused by execing programs
[spider.git] / perl / DXChannel.pm
index d540004e638f2c9ad2051dc487a37433f50f5549..5505610e9752b8520f6270733fdc0b1387185bc0 100644 (file)
@@ -231,6 +231,22 @@ sub disconnect
        $self->del();
 }
 
+#
+# just close all the socket connections down without any fiddling about, cleaning, being
+# nice to other processes and otherwise telling them what is going on.
+#
+# This is for the benefit of forked processes to prepare for starting new programs, they
+# don't want or need all this baggage.
+#
+
+sub closeall
+{
+       my $ref;
+       foreach $ref (values %channels) {
+               $ref->{conn}->disconnect() if $ref->{conn};
+       }
+}
+
 # various access routines
 
 #