On Thu, 2004-08-05 at 13:43, Dan Sugalski wrote:
Cool. On the Unix platforms we exec off 'sh' and pass in parameters (so we get command parameters split up right, IIRC). I'm presuming we don't do the same for Windows, so I'll make it the plain command and hope it all works out.
Well, that's one way you can do it, but it causes a ton of headaches, e.g. because
exec "echo <user's text goes here>"
gets shell interpretation and fails, so by way of example only, Perl 5 allows for both usages depending on what you pass it. Parrot could easily make the distinction based on being passed a string value or a PMC array of some sort and end up with roughly the same functionality as Perl (though Perl itself would not use this as-is, as it decides further based on the content of the string, and will call raw exec(2) on the results of splitting the string on whitespace if no shell metacharacters occur, but I think that's a bit too much Perlishness to put in Parrot).
Either way, Parrot really HAS to provide a raw POSIX exec, as it cannot be faked from a shell-using variant correctly.
Yeah, we really *should* do it right, rather than take the cheating way out as we are now. I'll go add this to the TODO list.
--
Dan
--------------------------------------it's like this------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk