top | item 18569758

(no title)

willghatch | 7 years ago

Rash only forks to launch processes, and it's all behind Racket's `subprocess` function. So there is no notion of eg. a forked subshell. But the `subprocess` function lets you get the subprocess file descriptors (as a special kind of port) or redirect subprocess IO to the ports of your choice. While pipeline segments that use Racket functions can pass each other arbitrary objects rather than just doing byte-level IO, pipeline segments that are just subprocesses do traditional Unix-style pipeline IO. And you can redirect a pipeline's input/output/error streams to arbitrary ports.

You can run pipelines in the background with Rash, but I haven't implemented job control yet, so I don't have proper handling for eg. auto-suspending a background TUI process and terminal control. (This ends up not being that big of a deal for most use, I find, though I intend to write better job control eventually.) I don't remember what Vim does off the top of my head, but I think running processes blocks Vim. Background pipelines don't block Rash, but if you don't specify to run one in the background the default behavior is to cause the current thread to wait for it to finish.

discuss

order

No comments yet.