]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Spawn.pm
ds: introduce awaitpid, switch ProcessPipe users
[public-inbox.git] / lib / PublicInbox / Spawn.pm
index 7f61d8db54cf6bec9daa1cd83b38eeade23f96b3..826ee508801ea1f9d519b16196c118e535997a02 100644 (file)
@@ -365,9 +365,9 @@ sub popen_rd {
        $opt->{1} = fileno($w);
        my $pid = spawn($cmd, $env, $opt);
        return ($r, $pid) if wantarray;
-       my $ret = gensym;
-       tie *$ret, 'PublicInbox::ProcessPipe', $pid, $r, @$opt{qw(cb arg)};
-       $ret;
+       my $s = gensym;
+       tie *$s, 'PublicInbox::ProcessPipe', $pid, $r, @{$opt->{cb_arg} // []};
+       $s;
 }
 
 sub run_die ($;$$) {