[Openmcl-devel] popen is not happy
gat at flownet.com
Wed Jun 4 21:35:59 UTC 2003
> The analogous C code would be something closer to:
> That assumes that the C compiler allocates that "ls" and "r+" each
> time into the code. It stores the string constants away, and only
> allocates the cmd and mode pointers.
Oh yeah. Right. Duh. Now I remember why I like Lisp better than C. ;-)
So to get the behavior I want I need to much with pipe() and dup() and
fork() in order to create the equivalent of Python's os.popen2 (or CLisp's
make-pipe-io-stream). (I find it somewhat astonishing that after this
many decades of unix that opening a bidirectional communications channel
to a subprocess is not a standard thing.)
> It seems to me that if there really is a bug in OSX/Darwin
It's not clear whether this is a bug in the code or the docs. "r+" is an
extension to the usual behavior of popen.
Thanks for all the responses!
Openmcl-devel mailing list
Openmcl-devel at clozure.com
More information about the Openmcl-devel