Open maenu opened 5 years ago
The code sections to look are:
PhlImage>>launchWithSettings:
PhLProcessWrapper>>runUnwatch
PhLProcessWrapper>>prepareLinuxProcess
OSSUnixSubprocess>>loginShellCommand:
Incorrectly applies -l and -c to the result of:
OSSUnixSubprocess>>shellCommand
Incorrectly uses the environment’s SHELL variable
which might not support -l -c
as is the case with tcsh
As a workaround, disabling the setting "Use login shell" works with tcsh, but still, the launcher should not just fail silently when launching an image in the described case with the login shell. At least it should give an error message with the command and stderr/out.
We noticed an issue when using launcher with
tcsh
on MacOS. The$SHELL
is set to/bin/tcsh
, the default setting in launcher seems to beuse login shell
. Then it creates a command like/bin/tcsh -l -c <pharo> <image>
, buttcsh
only allows-l
when used as the only argument (see https://linux.die.net/man/1/tcsh).The current behavior in this situation is as follows: Launching an image does nothing, no image spawns, no message is given. One thing to fix is to make sure that early crashes of launches are captured and the stderr/stdout is presented as a warning to the user. That way at least one knows what happened and the launcher gives feedback on why things failed.
Another thing to fix is to treat
tcsh
properly. Assuming that the shell supports-l -c
is wrong, as this example shows. Each shell should be treated differently, maybe a setting for setting the shell to use in the launcher would also be helpful.