Closed andrewchambers closed 5 years ago
(sh/coprocess ... ) -> {:job ... :stdin ... :stdout ... stderr ...}
e.g. Expose janetsh over network:
(let [proc (coprocess janetsh)] ($ nc -l < (proc :stdout) > (proc :stdin)))
Things like $$ can be implemented in terms of coprocesses.
To implement the coprocess api, we may need to make file descriptor types from shlib that are gcable and can't be closed twice.
I have decided for now, this is worse than an api for explicitly creating/closing pipes.
e.g. Expose janetsh over network:
Things like $$ can be implemented in terms of coprocesses.
To implement the coprocess api, we may need to make file descriptor types from shlib that are gcable and can't be closed twice.