Defend against potential token-pasting bug
[scpubgit/Tak.git] / lib / Tak / ConnectorService.pm
index 3bcf64e..90333bc 100644 (file)
@@ -23,13 +23,13 @@ sub handle_create {
   my $log_level = $args{log_level}||'info';
   my ($kid_in, $kid_out, $kid_pid) = $self->_open($on, $log_level);
   if ($kid_pid) {
-    $kid_in->print($Tak::STDIONode::DATA, "__END__\n") unless $on eq '-';
+    $kid_in->print($Tak::STDIONode::DATA, "\n__END__\n") unless $on eq '-';
     # 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 "Ssyshere\n";
+      unless $up eq "Shere\n";
   }
   my $connection = Tak::ConnectionService->new(
     read_fh => $kid_out, write_fh => $kid_in,