cvsuser 04/08/05 10:43:06
Modified: config/gen/platform/win32 exec.c
Log:
This may make exec work on windows
Revision Changes Path
1.8 +8 -1 parrot/config/gen/platform/win32/exec.c
Index: exec.c
===================================================================
RCS file: /cvs/public/parrot/config/gen/platform/win32/exec.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -w -r1.7 -r1.8
--- exec.c 5 Aug 2004 17:31:04 -0000 1.7
+++ exec.c 5 Aug 2004 17:43:06 -0000 1.8
@@ -45,5 +45,12 @@
void
Parrot_Exec_OS_Command(Parrot_Interp interpreter, STRING *command) {
- internal_exception(NOSPAWN, "Exec not implemented");
+ /* Be horribly profligate with memory, since we're
+ about to be something else */
+ int status;
+ status = _execlp(string_to_cstring(interpreter, command), NULL);
+ /* if we get here, something's horribly wrong... */
+ if (status) {
+ internal_exception(NOSPAWN, "Exec failed, code %i", status);
+ }
}