about summary refs log tree commit
path: root/t/v2writable.t
diff options
context:
space:
mode:
Diffstat (limited to 't/v2writable.t')
-rw-r--r--t/v2writable.t8
1 files changed, 3 insertions, 5 deletions
diff --git a/t/v2writable.t b/t/v2writable.t
index 28420bb9..4bb6d733 100644
--- a/t/v2writable.t
+++ b/t/v2writable.t
@@ -163,12 +163,10 @@ EOF
         close $fh or die "close: $!\n";
         my $sock = tcp_server();
         ok($sock, 'sock created');
-        my $pid;
         my $len;
-        END { kill 'TERM', $pid if defined $pid };
-        my $nntpd = 'blib/script/public-inbox-nntpd';
-        my $cmd = [ $nntpd, '-W0', "--stdout=$out", "--stderr=$err" ];
-        $pid = spawn_listener({ PI_CONFIG => $pi_config }, $cmd, [ $sock ]);
+        my $cmd = [ '-nntpd', '-W0', "--stdout=$out", "--stderr=$err" ];
+        my $env = { PI_CONFIG => $pi_config };
+        my $td = start_script($cmd, $env, { 3 => $sock });
         my $host_port = $sock->sockhost . ':' . $sock->sockport;
         my $n = Net::NNTP->new($host_port);
         $n->group($group);