git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11314
d0543943-73ff-0310-b7d9-
9358b9ac24b2
}
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;