Typically, in CLI applications on Linux such as editors or REPLs, typing Ctrl-Z will temporarily suspend the editor or REPL and drop you back into the parent shell. However, the Dyalog CLI session on Linux doesn't do this; typing Ctrl-Z directly inserts a SUB character into the session.
Under the hood, Ctrl-Z defaults to sending SIGSTP to the foreground process, so as a workaround we can do the same:
Code: Select all
'getpid' ⎕SE.getpid 'I4 libc.so.6|getpid' ⍝ pid_t getpid(void)
'kill' ⎕SE.kill 'I4 libc.so.6|kill I4 I4' ⍝ int kill(pid_t pid, int sig)
⎕SE.⎕FX 'susp;sigstp' 'getpid kill sigstp←20'