nomis80 has asked for the wisdom of the Perl Monks concerning the following question:
defined (my $pid = open(FROM_CHILD, "-|")) or die "can't fork: $!"; if ($pid) { my @output = <FROM_CHILD>; wait; close FROM_CHILD; return @output; } else { exec "/usr/bin/sudo", @command; die "can't exec: $!"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Redirecting STDERR to STDOUT securely
by belg4mit (Prior) on Dec 12, 2001 at 21:28 UTC | |
by nomis80 (Sexton) on Dec 12, 2001 at 21:42 UTC | |
|
Re: Redirecting STDERR to STDOUT securely
by mortis (Pilgrim) on Dec 12, 2001 at 22:15 UTC |