Le 20/11/2014 08:47, Barriere, Francois a écrit :
> The problem occurs when I start a script (I wrote for testing)
> from LSF (job dispatcher, like SunGrid), but not when I run the
> same script in an interactive session.
Me, again,
digging further, I see a difference in the way the alias is
treated compared to the unalias. This in the case of an alias
with no argument (in the case of an alias with arguments, it
seems, the selection alias vs func is the same).
Looking at output_unset_alias() and output_set_alias() in utility.c,
it seems:
- in "set" mode, if the shell is "bash" and the shell is interactive,
an "alias" is generated. So in my case, with LSF, the shell should
not be considered "interactive", and a function() is generated.
- in "unset" mode, if the shell is bash, if the value of the alias
contains parameters, the function is unset.
But if the value of the alias does not contain any parameter,
"unalias" is used, without testing the "interactive" nature of
the shell...
It seems, I have triggered a corner case, when the shell is not
interactive, the shell is bash and the alias does not contain
any parameter...
May be, considering the interactive nature of the shell is
the "unalias" case should fix my problem... Or should I remove
the test on is_interactive() is output_set_alias()?
François.
--
Francois Barriere
CAD wizard / Atmel Corporation
Tel: +33 442 536 198
fra...@at... / www.atmel.com
*********************************
To lift an autumn hair is no sign of great strength; to see the sun and
moon is no sign of sharp sight; to hear the noise of thunder is no sign
of a quick ear. (The art of war, Sun Zu).
*********************************
|