Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Table of Contents
* [Details](#details)
* [Options](#options)
* [HTCondor jobs](#htcondor-jobs)
* [Caveats](#caveats)
* [Interactive commands and signals](#interactive-commands-and-signals)
* [bind_condor.sh](#bind_condorsh)
* [Usage](#usage-1)
* [Setting up bindings](#setting-up-bindings)
Expand Down Expand Up @@ -171,14 +171,13 @@ or placed in a file `~/.callhostrc` (automatically detected and sourced by `call
```
* Using the `ENV()` function in the JDL file may not function as intended, since it will be evaluated on the host node, rather than inside the container with your environment set up.

### Caveats
### Interactive commands and signals

* Commands that require tty input (such as `nano` or `emacs -nw`) will not work with `call_host`.
* 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.
It is necessary to exit and reenter the container (in order to create a new pipe) if this occurs.
To prevent this, chain multiple commands using logical operators (`&&` or `||`), or surround all the commands in `()` (thereby running them in a subshell).
* Stopping a command in progress with ctrl+C is disabled (to avoid breaking the pipe as described in the previous item).
* Suspending a command with ctrl+Z is not supported and may break the session.
* 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.
* 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).
* 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`.
* 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.
* 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.

## `bind_condor.sh`

Expand Down
Loading
Loading