]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Spawn.pm
spawn: split() on regexp, not a literal string
[public-inbox.git] / lib / PublicInbox / Spawn.pm
index e5c0b1e94d03079455ce6ecea8fd977c468c4998..86f66605f0a6540180d9bf9f05ff093241511138 100644 (file)
@@ -209,7 +209,7 @@ my $fdpass = <<'FDPASS';
 #include <sys/socket.h>
 
 #if defined(CMSG_SPACE) && defined(CMSG_LEN)
-#define SEND_FD_CAPA 4
+#define SEND_FD_CAPA 6
 #define SEND_FD_SPACE (SEND_FD_CAPA * sizeof(int))
 union my_cmsg {
        struct cmsghdr hdr;
@@ -343,7 +343,7 @@ undef $fdpass;
 sub which ($) {
        my ($file) = @_;
        return $file if index($file, '/') >= 0;
-       foreach my $p (split(':', $ENV{PATH})) {
+       for my $p (split(/:/, $ENV{PATH})) {
                $p .= "/$file";
                return $p if -x $p;
        }