"fake Unix" strikes again...
The fix is easy enough, but I hate having to code work-arounds for proprietary OSs when the same code works fine on Linux and BSD. /me wisely avoids words like posix in his rant ;-) Thanks to Franck Zoccolo for help in finding what the problem was and when and why it occurred. ---- Someday there will be some issue that requires a fix with significant code change (or worse, a change that is incompatible with Linux), and I will probably refuse. Of course, I will be properly regretful about my inability to fix it.[1]
This commit is contained in:
parent
b5024027ca
commit
273e6fd627
|
@ -274,7 +274,7 @@ sub logger_plus_stderr {
|
||||||
|
|
||||||
sub tsh_try {
|
sub tsh_try {
|
||||||
my $cmd = shift; die "try: expects only one argument" if @_;
|
my $cmd = shift; die "try: expects only one argument" if @_;
|
||||||
$text = `( $cmd ) 2>&1; echo -n RC=\$?`;
|
$text = `( $cmd ) 2>&1; /bin/echo -n RC=\$?`;
|
||||||
if ( $text =~ s/RC=(\d+)$// ) {
|
if ( $text =~ s/RC=(\d+)$// ) {
|
||||||
$rc = $1;
|
$rc = $1;
|
||||||
trace( 3, $text );
|
trace( 3, $text );
|
||||||
|
|
|
@ -333,7 +333,7 @@ sub _sh {
|
||||||
# TODO: switch to IPC::Open3 or something...?
|
# TODO: switch to IPC::Open3 or something...?
|
||||||
|
|
||||||
dbg( 4, " running: ( $cmd ) 2>&1" );
|
dbg( 4, " running: ( $cmd ) 2>&1" );
|
||||||
$text = `( $cmd ) 2>&1; echo -n RC=\$?`;
|
$text = `( $cmd ) 2>&1; /bin/echo -n RC=\$?`;
|
||||||
$lec = $cmd;
|
$lec = $cmd;
|
||||||
dbg( 4, " results:\n$text" );
|
dbg( 4, " results:\n$text" );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue