[Freeswitch-svn] [commit] r11314 - freeswitch/trunk/src
FreeSWITCH SVN
anthm at freeswitch.org
Tue Jan 20 10:35:07 PST 2009
Author: anthm
Date: Tue Jan 20 12:35:07 2009
New Revision: 11314
Log:
fix restart for mac
Modified:
freeswitch/trunk/src/switch.c
Modified: freeswitch/trunk/src/switch.c
==============================================================================
--- freeswitch/trunk/src/switch.c (original)
+++ freeswitch/trunk/src/switch.c Tue Jan 20 12:35:07 2009
@@ -653,8 +653,18 @@
}
if (destroy_status == SWITCH_STATUS_RESTART) {
- switch_sleep(1000000);
+ char buf[1024] = "";
+ int i = 0;
+
+ switch_sleep(1000000);
ret = (int)execv(argv[0], argv);
+ fprintf(stderr, "Restart Failed [%s] resorting to plan b\n", strerror(errno));
+
+ for(i = 0; i < argc; i++) {
+ switch_snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "%s ", argv[i]);
+ }
+
+ ret = system(buf);
}
return ret;
More information about the Freeswitch-svn
mailing list