ould you explain why it isn't helpful,
Because CreateProcess() is the only way to spawn a new process on windows; and it only accepts a single string containing the runtime arguments.
If you supply system with the list form of arguments, they just get concatenated together, before being passed as the second argument to CreateProcess().
There is some attempt to apply intelligence to the concatenation process, but is does not handle paths with spaces (correctly):
win32_spawnvp(int mode, const char *cmdname, const char *const *argv) { #ifdef USE_RTL_SPAWNVP return spawnvp(mode, cmdname, (char * const *)argv); #else dTHXa(NULL); int ret; void* env; char* dir; child_IO_table tbl; STARTUPINFO StartupInfo; PROCESS_INFORMATION ProcessInformation; DWORD create = 0; char *cmd; char *fullcmd = NULL; char *cname = (char *)cmdname; STRLEN clen = 0; if (cname) { clen = strlen(cname); /* if command name contains dquotes, must remove them */ ...
About the dumbest thing it could do...
In reply to Re^3: Executing perl program from another perl program and capturing the output
by BrowserUk
in thread Executing perl program from another perl program and capturing the output
by rgren925
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |