Doc Update: Compatible shells for SSHManager#41285
Doc Update: Compatible shells for SSHManager#41285SamuraiAku wants to merge 1 commit intoJuliaLang:masterfrom
Conversation
|
The POSIX shell evolved out of the Korn shell (ksh) and both Bash and Zsh are widely used POSIX-compatible shells. In contrast, csh and tcsh are not POSIX shells. They have a quite different syntax, for example when it comes to the details of escaping meta-characters in strings. Unescaped newline characters not being allowed in quoted strings is not the only difference between a POSIX shell and (t)csh. I wouldn't try to make We can add proper I'd be happy to prepare a properly tested (t)csh-support PR if there really is a user requirement for that. Frankly, I hadn't realized that tcsh is still being used today. I had thought csh-derivates had widely fallen out of favour following Tom Christiansen's Csh Programming Considered Harmful postings in the mid 1990s; I hadn't used it myself for the past quarter century (until starting to test Having said all that: I'm not sure why the current which doesn't use any |
|
That was an interesting history lesson in shells. As for why I'm using tcsh, it's because that was the default on the system I'm using. I don't like shell scripting at all and so the distinctions between bash and tcsh don't mean a whole lot to me. Why is the default tcsh? I'm not certain but this quora answer sounds about right. I'm thinking that this PR should turn into a documentation update. Add a note to the kwargs documentation saying that csh style shells are not supported. For less sophisticated users (like myself), POSIX compliant is really a synonym for "not Windows". Unless mgkhun is willing to go to the effort of adding csh support. |
b1c2309 to
01d9e76
Compare
|
@mgkuhn I've backed out the changes to the shell commands and added a note to the documentation. What do you think? |
I have the same problem. Could you please clarify how you fixed this please? Thanks |
@grandemundo82 the answer is to change your default shell. You must be using csh or tcsh like I was. Change your default shell to bash and it should work. |
|
I hope to have an alternative PR with proper Here is a first draft of the csh escaping function that this implementation will require |
|
A PR for proper C shell support is now ready at #41485. |
|
Thanks for adding this! |
Original Post below. Kept to provide context to the final resolution.
This PR resolves an issue that I had using SSHManager (v1.6.1) under the tcsh shell in Linux. The problem was that the shell command that spawns the worker on the remote machine wasn’t working.
I determined that the problem was that the ssh shell command included two commands to be executed on the remote machine
These two commands are currently delimited by a “\n” which works for many shells, but not for tcsh for some reason. As a result, the worker never launches and addproc() fails.
I fixed this by replacing the “\n” with a “; ”. This allowed the worker process to spawn. I also tested it with zsh on an M1 MacBook and that worked as well.
To the best of my knowledge about shell commands, I don’t think that this change would break any other shells. But feedback from others more knowledgeable than myself is appreciated.