add comments to clarify the initial handshake
[scpubgit/Tak.git] / lib / Tak / ConnectorService.pm
index a3a3caa..7e1d4b1 100644 (file)
@@ -19,9 +19,12 @@ sub handle_create {
   my $log_level = $args{log_level}||'info';
   my ($kid_in, $kid_out, $kid_pid) = $self->_open($on, $log_level);
   $kid_in->print(io('maint/mk-fat |')->all, "__END__\n");
+  # Need to get a handshake to indicate STDIOSetup has finished
+  # messing around with file descriptors, otherwise we can severely
+  # confuse things by sending before the dup.
   my $up = <$kid_out>;
   die [ failure => "Garbled response from child: $up" ]
-    unless $up eq "UP\n";
+    unless $up eq "Ssyshere\n";
   my $connection = Tak::ConnectionService->new(
     read_fh => $kid_out, write_fh => $kid_in,
     listening_service => Tak::Router->new