[racket] current-subprocess-custodian-mode

From: Thomas Chust (chust at web.de)
Date: Fri Feb 15 07:25:50 EST 2013

On Fri, 15 Feb 2013, Norman Gray wrote:

> On 2013 Feb 15, at 00:30, Matthew Flatt wrote:
>> At Thu, 14 Feb 2013 13:42:38 +0000, Norman Gray wrote:
>>> [...]
>>> What I _want_ to do here is basically execv(3) vi from a Racket program.
>>> [...]
>> The `system' function uses threads as needed to pump from
>> non-file-stream ports to the subprocess, but probably that's not what
>> you want to run `vi'.
>> Getting the original stdin, stdout, and stderr is unsafe from Racket's
>> perspective (which wants to allow a program to control the ports that a
>> sandboxed program can reach, for example). You could use the FFI to get
>> those ports, though.
> That's more than I'd want to get involved with in this case, for what is basically a quick utility program.
> [...]


perhaps it would be an option to open /dev/tty in order to obtain a fresh 
handle to the current controlling terminal that could then be passed on to 
an external process' standard input, output and/or error.

Of course that solution is only portable to *nix systems.


When C++ is your hammer, every problem looks like your thumb.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1600 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.racket-lang.org/users/archive/attachments/20130215/870d835f/attachment.p7s>

Posted on the users mailing list.