[Openmcl-devel] popen is not happy
Erann Gat
gat at flownet.com
Wed Jun 4 14:35:59 PDT 2003
Gary:
> The analogous C code would be something closer to:
Barry:
> 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.)
Jaap:
> 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!
E.
_______________________________________________
Openmcl-devel mailing list
Openmcl-devel at clozure.com
http://clozure.com/cgi-bin/mailman/listinfo/openmcl-devel
More information about the Openmcl-devel
mailing list