changeset 6660:48a31082bf5f

[gaim-migrate @ 7185] Patch from Kevin Strange to make executable pounces workon windows. committer: Tailor Script <tailor@pidgin.im>
author Herman Bloggs <hermanator12002@yahoo.com>
date Sun, 31 Aug 2003 18:00:38 +0000
parents d5b6681b2155
children fd38fbce8081
files src/gtkpounce.c
diffstat 1 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkpounce.c	Sun Aug 31 16:51:39 2003 +0000
+++ b/src/gtkpounce.c	Sun Aug 31 18:00:38 2003 +0000
@@ -866,7 +866,6 @@
 		}
 	}
 
-#ifndef _WIN32
 	if (gaim_pounce_action_is_enabled(pounce, "execute-command")) {
 		const char *command;
 
@@ -874,6 +873,7 @@
 												   "command");
 
 		if (command != NULL) {
+#ifndef _WIN32
 			int pid = fork();
 
 			if (pid == 0) {
@@ -888,9 +888,19 @@
 
 				_exit(0);
 			}
+#else
+			STARTUPINFO StartInfo;
+			PROCESS_INFORMATION ProcInfo;
+
+			memset(&ProcInfo, 0, sizeof(ProcInfo));
+			memset(&StartInfo, 0 , sizeof(StartInfo));
+			StartInfo.cb = sizeof(StartInfo);
+			CreateProcess(NULL, (char *)command, NULL, NULL, 0, 0, NULL, NULL, &StartInfo, &ProcInfo);
+                        gaim_debug(GAIM_DEBUG_INFO, "pounce", "Pounce execute command called for: %s\n", command);
+
+#endif
 		}
 	}
-#endif /* _WIN32 */
 
 	if (gaim_pounce_action_is_enabled(pounce, "play-sound")) {
 		const char *sound;