When I log into Linux and type the “env” command, it includes the following lines:
BASH_FUNC_which%%=() { ( alias;
eval ${which_declare} ) | /usr/bin/which –tty-only –read-alias –read-functions –show-tilde –show-dot $@
}
If I restart the host server from the command line, then this environmental setting makes it into the host server process (checked with “ps xeww”):
BASH_FUNC_which%%=() { ( alias;
Now if I restart an engine process from the GUI, and one of the threads in the process tries to call a shell command with “exec sh -c” then the command fails, and I get this error:
[sms :sms :ERR /0: uu_in:11/10/2022 13:54:25] Tcl error:
[sms :sms :ERR /0: uu_in:–/–/—- –:–:–] msgId = none
[sms :sms :ERR /0: uu_in:–/–/—- –:–:–] proc = ‘tps_david’
[sms :sms :ERR /0: uu_in:–/–/—- –:–:–] args = ”
[sms :sms :ERR /0: uu_in:–/–/—- –:–:–] result = ‘testing bug with which
[sms :sms :ERR /0: uu_in:–/–/—- –:–:–] sh: which: line 1: syntax error: unexpected end of file
[sms :sms :ERR /0: uu_in:–/–/—- –:–:–] sh: error importing function definition for `which”
[sms :sms :ERR /0: uu_in:–/–/—- –:–:–] errorInfo: ‘
[sms :sms :ERR /0: uu_in:–/–/—- –:–:–] testing bug with which
[sms :sms :ERR /0: uu_in:–/–/—- –:–:–] sh: which: line 1: syntax error: unexpected end of file
[sms :sms :ERR /0: uu_in:–/–/—- –:–:–] sh: error importing function definition for `which’
[sms :sms :ERR /0: uu_in:–/–/—- –:–:–] while executing
[sms :sms :ERR /0: uu_in:–/–/—- –:–:–] “exec sh -c “echo testing bug with which””
[sms :sms :ERR /0: uu_in:–/–/—- –:–:–] (procedure “tps_david” line 30)
[sms :sms :ERR /0: uu_in:–/–/—- –:–:–] invoked from within
[sms :sms :ERR /0: uu_in:–/–/—- –:–:–] “tps_david {CONTEXT sms_ib_data} {ARGS {}} {MODE start} {VERSION 3.0}”‘
The workaround is to either start the host server using startup scripts (systemd) or type “unset which” before manually starting the host server. Starting engine processes from the command line doesn’t seem to cause the problem, it’s only when they are started from the host server.
I’ve got a ticket open with Redhat about this because the problem doesn’t seem Cloverleaf specific.