You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-8Lines changed: 7 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ Table of Contents
12
12
*[Details](#details)
13
13
*[Options](#options)
14
14
*[HTCondor jobs](#htcondor-jobs)
15
-
*[Caveats](#caveats)
15
+
*[Interactive commands and signals](#interactive-commands-and-signals)
16
16
*[bind_condor.sh](#bind_condorsh)
17
17
*[Usage](#usage-1)
18
18
*[Setting up bindings](#setting-up-bindings)
@@ -171,14 +171,13 @@ or placed in a file `~/.callhostrc` (automatically detected and sourced by `call
171
171
```
172
172
* Using the `ENV()`functionin the JDL file may not functionas intended, since it will be evaluated on the host node, rather than inside the container with your environment set up.
173
173
174
-
### Caveats
174
+
### Interactive commands and signals
175
175
176
-
* Commands that require tty input (such as `nano` or `emacs -nw`) will not work with `call_host`.
177
-
* Occasionally, if a command fails (especially when calling multiple commands separated by semicolons), the pipe will break and the terminal will appear to hang. The message "Interrupted system call" may be shown.
178
-
It is necessary to exit and reenter the container (in order to create a new pipe) if this occurs.
179
-
To prevent this, chain multiple commands using logical operators (`&&` or `||`), or surround all the commands in`()` (thereby running them in a subshell).
180
-
* Stopping a commandin progress with ctrl+C is disabled (to avoid breaking the pipe as described in the previous item).
181
-
* Suspending a command with ctrl+Z is not supported and may break the session.
176
+
* Commands that require tty input (such as `nano` or `emacs -nw`) now work with `call_host`, provided you are using `call_host` interactively (i.e. your terminal is a real tty). When both the input and output of `call_host` are a terminal, the host command is run under a pseudo-terminal (pty) so that full-screen and interactive programs behave normally.
177
+
* This requires `python3` on the host node (present on essentially all interactive nodes). If `python3` is unavailable, `script` is used as a fallback (interactive programs still work, but ctrl+C is delivered via the slower signal path described below);if neither is available, the command runs without a pty (as before).
178
+
* Your stdin is forwarded to the host command, so piping or redirecting input works, e.g. `echo data | call_host some_command` or `call_host some_command < input.txt`.
179
+
* Pressing ctrl+C now interrupts the running host command (and returns you to your prompt) instead of being ignored, in both interactive and non-interactive use. The container session is left intact.
180
+
* Pressing ctrl+Z does not suspend the host command (job-control suspension cannot be supported across the container boundary), but it no longer breaks the session or leaves a stray process on the host: the keystroke is simply ignored and the command keeps running. Use ctrl+C if you want to stop it.
0 commit comments