Don't set PATH when running external shell command.
authorRichard Jones <rjones@redhat.com>
Thu, 4 Mar 2010 13:06:30 +0000 (13:06 +0000)
committerRichard Jones <rjones@redhat.com>
Thu, 4 Mar 2010 13:06:30 +0000 (13:06 +0000)
techtalk-pse.pl

index ae3737b..453bf09 100755 (executable)
@@ -326,8 +326,7 @@ sub show_slide
             unless ($pid) {
                 # Child.
                 POSIX::setsid ();
-                $ENV{PATH} = ".:$ENV{PATH}";
-                exec ($slide->{name});
+                exec ("./".$slide->{name});
                 die "failed to execute command: ", $slide->{name}, ": $!";
             }
             # Parent returns.