"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:
Sitaram Chamarty 2012-04-17 10:04:34 +05:30
parent b5024027ca
commit 273e6fd627
2 changed files with 2 additions and 2 deletions

View file

@ -274,7 +274,7 @@ sub logger_plus_stderr {
sub tsh_try {
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+)$// ) {
$rc = $1;
trace( 3, $text );

View file

@ -333,7 +333,7 @@ sub _sh {
# TODO: switch to IPC::Open3 or something...?
dbg( 4, " running: ( $cmd ) 2>&1" );
$text = `( $cmd ) 2>&1; echo -n RC=\$?`;
$text = `( $cmd ) 2>&1; /bin/echo -n RC=\$?`;
$lec = $cmd;
dbg( 4, " results:\n$text" );