From: Alfons Hoogervorst Date: Fri, 16 Aug 2002 18:42:45 +0000 (+0000) Subject: use execvp() correctly (suggested by wwp; thanks!) X-Git-Tag: before_folder_color~16 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=8e35936714c059480e79caedee5b93b91a8ee6f9;hp=de33f9bfbe5fb0ffe555361a2b89db2a2cc9e5b8;ds=inline use execvp() correctly (suggested by wwp; thanks!) --- diff --git a/ChangeLog.claws b/ChangeLog.claws index 40e9fdb86..edb81bc76 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -1,3 +1,8 @@ +2002-08-16 [alfons] 0.8.1claws70 + + * src/crash.c + use execvp() correctly (suggested by wwp; thanks!) + 2002-08-16 [alfons] 0.8.1claws69 * src/gtksctree.c diff --git a/configure.in b/configure.in index 46adafa51..306ebf416 100644 --- a/configure.in +++ b/configure.in @@ -8,7 +8,7 @@ MINOR_VERSION=8 MICRO_VERSION=1 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=claws69 +EXTRA_VERSION=claws70 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION dnl set $target diff --git a/src/crash.c b/src/crash.c index 6c47c5f12..b0a72fc4d 100644 --- a/src/crash.c +++ b/src/crash.c @@ -305,7 +305,7 @@ static void crash_debug(unsigned long crash_pid, pipe(choutput); if (0 == (pid = fork())) { - char *argp[9]; + char *argp[10]; char **argptr = argp; gchar *filespec = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, DEBUGGERRC, NULL); @@ -315,6 +315,7 @@ static void crash_debug(unsigned long crash_pid, /* * setup debugger to attach to crashed sylpheed */ + *argptr++ = "gdb"; *argptr++ = "--nw"; *argptr++ = "--nx"; *argptr++ = "--quiet"; @@ -490,18 +491,19 @@ static void crash_handler(int sig) if (0 == (pid = fork())) { char buf[50]; - char *args[4]; + char *args[5]; /* * probably also some other parameters (like GTK+ ones). * also we pass the full startup dir and the real command * line typed in (argv0) */ - args[0] = "--debug"; - args[1] = "--crash"; + args[0] = argv0; + args[1] = "--debug"; + args[2] = "--crash"; sprintf(buf, "%ld,%d,%s", getppid(), sig, argv0); - args[2] = buf; - args[3] = NULL; + args[3] = buf; + args[4] = NULL; chdir(startup_dir); setgid(getgid());