Enlightenment CVS committal Author : raster Project : e17 Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore Modified Files: ecore_app.c Log Message: app restart has fixed buffer - doesnt need malloc for a restart now (safer) =================================================================== RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore/ecore_app.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- ecore_app.c 6 Jan 2006 17:58:12 -0000 1.6 +++ ecore_app.c 20 Aug 2006 08:16:34 -0000 1.7 @@ -46,18 +46,15 @@ * using the command-line arguments stored by ecore_app_args_set(). This is * an easy way for a program to restart itself for cleanup purposes, * configuration reasons or in the event of a crash. - * - * FIXME: Currently not implimented. */ EAPI void ecore_app_restart(void) { - char **args; + char *args[4096]; int i; if ((app_argc < 1) || (!app_argv)) return; - args = malloc((app_argc + 1) * sizeof(char *)); - if (!args) return; + if (app_argc >= 4096) return; for (i = 0; i < app_argc; i++) args[i] = app_argv[i]; args[i] = NULL; execvp(app_argv[0], args); ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs