Help on g_spwan_async
Harring Figueiredo <[email protected]>
| Newsgroups | gmane.comp.video.gimp.windows.devel |
|---|---|
| Message-ID | <20021119154834.22216.qmail__37050.4705854275$1037720927@web41001.mail.yahoo.com> |
Folks,
I have the following code:
exe_string = g_strdup_printf("%s %s", rm_cmd, path);
g_print("Executing command: %s\n", exe_string);
if ( g_shell_parse_argv(exe_string ,&i, &exe_cmd , &error) != TRUE) {
*err = g_strdup(error->message);
g_error_free(error);
return FALSE;
}
ret_val = g_spawn_async_with_pipes(NULL, exe_cmd ,NULL,
G_SPAWN_LEAVE_DESCRIPTORS_OPEN | G_SPAWN_SEARCH_PATH,
NULL, NULL, &pid, NULL, NULL, NULL, &error);
rm_cmd = "deltree /Y" and path= "I:\somepath\somedir"
When I run the command on windowze, I can see the DOS console windows poping
up and desapearing; however, the directory never gets deleted.
IF I do an exact copy andpaty of the command that I output with g_print
above, the directory gets deleted.
What am I doing wrong here ?
NOTE: I am using this code because I need to delete anentire directory
structure on Windows and the remove() calls is only working for files -- I
guess it has a bug reported on the remove(3) man pages.
If anyone has a better suggestion that the code above, please drop me a line.
Note 2: compiled with mingwin gcc 2.95.3 (Windows binary from Tor's site.)
Thanks for any help.
Harring.
__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com
To Post a message, send it to: [email protected]
To Unsubscribe, send a blank message to: [email protected]
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/