UO-OACISS / tau2

TAU Performance System Public Mirror (Updated every night at midnight, USA Pacific Time)
http://tau.uoregon.edu
Other
36 stars 15 forks source link

Return code of `tau_exec` #2

Open spoutn1k opened 3 years ago

spoutn1k commented 3 years ago

Hey everyone,

I am using tau_exec in a script and I relied on its returncode to check the status of the previous command. I encountered this case:

~> tau_exec non-existent-command
tau_exec: non-existent-command: command not found
~> echo $?
0

I expected it to be more than 0, as:

~> tau_exec /
/home/users/jskutnik/tau2/x86_64/bin/tau_exec: line 1379: /: Is a directory
~> echo $?
126

And the standard behaviour of such commands reflects this:

~> time non-existent-command
bash: non-existent-command: command not found...

real    0m0.226s
user    0m0.008s
sys 0m0.008s
~> echo $?
127

The returncode is empty here so I wanted to check if this was intended before doing anything.

Thanks !