Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

New stuff going in soon (And I need some non-unix help here)

5 views
Skip to first unread message

Dan Sugalski

unread,
Feb 10, 2004, 3:40:26 PM2/10/04
to perl6-i...@perl.org
Sorry to be so incommunicado lately, but I'm hoping that'll end soon.
I know I've got a lot of stuff to dig through, and I definitely owe
Leo a bunch of answers for things.

However, in the mean time...

I'm going to be adding in perl 5-style system() support in a bit.
This is where you do something like:

$status = system("rm -rf /");

and parrot spawns a subprocess to execute the command, waits for it
to be done, and returns a status code.

Doing this for Unix is simple, it's just a fork, exec, and wait. No
biggie, though I fully expect to screw it up the first time through.
I know what needs doing for VMS, though I don't have a VMS box easily
accessible to work with (dammit). I know this is doable on Windows,
though I don't know how. I can go dig through the perl 5 source, but
I'd as soon not, in part because I can't test too well and I'd rather
get an implementation from someone who's done it and can test it. :)

Anyway, there'll be a new entry in the platform-specific API,
Parrot_Run_OS_Command, that'll look like:

INTVAL Parrot_Run_OS_Command(interpreter, STRING *command);

to do this. I'll stub out windows to just pitch an exception, but if
folks could be thinking about how to do it I'd much appreciate it.
(And no, we're not touching fork at the moment. Later. Possibly only
on some platforms. Definitely later, though)
--
Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
d...@sidhe.org have teddy bears and even
teddy bears get drunk

0 new messages