[pve-devel] perl pipe problems
Stefan Priebe - Profihost AG
s.priebe at profihost.ag
Mon Oct 29 08:51:43 CET 2012
Hi,
to me this works fine:
# perl -e 'system("set -o pipefail; false | true");print $? >>8, "\n";'
1
#
But i've mapped /bin/sh to bash
# la /bin/sh
lrwxrwxrwx 2 root root 4 Apr 26 2012 /bin/sh -> bash
As i don't like the debian stripped down dash.
Another idea could be to fork two programes on your own and do the
piping yourself in perl - so that you can query each pid for the exit code.
Stefan
Am 29.10.2012 08:12, schrieb Dietmar Maurer:
>> I tried to use option 'pipefail' but get:
>>
>> # perl -e 'system("set -o pipefail;false | true");print $?>>8,"\n"'
>> set: 1: Illegal option -o pipefail
>
> Seems perl use /bin/sh (instead of /bin/bash), although I set $ENV{SHELL}="/bin/bash";
>
> how can is set the default shell in perl?
>
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
More information about the pve-devel
mailing list