From 92f1bf261cd166d32d2a4967943c26e65a3b9d34 Mon Sep 17 00:00:00 2001 From: Martin Baulig Date: Tue, 17 Nov 1998 23:12:35 +0000 Subject: [PATCH] We need to set argv[0] in call to execl () to avoid a core dump in _init 1998-11-18 Martin Baulig * lib/open.c (glibtop_open_l): We need to set argv[0] in call to execl () to avoid a core dump in _init () on FreeBSD 3.0. --- ChangeLog | 5 +++++ lib/open.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 548a5b90..a5b6fa50 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +1998-11-18 Martin Baulig + + * lib/open.c (glibtop_open_l): We need to set argv[0] in call + to execl () to avoid a core dump in _init () on FreeBSD 3.0. + 1998-11-11 Martin Baulig * include/glibtop/gnuserv.h (MCOOKIE_SCREEN): Don't define this diff --git a/lib/open.c b/lib/open.c index 75204731..c052fe72 100644 --- a/lib/open.c +++ b/lib/open.c @@ -108,7 +108,7 @@ glibtop_open_l (glibtop *server, const char *program_name, close (server->input [0]); close (server->output [1]); dup2 (server->input [1], 1); dup2 (server->output [0], 0); - execl (LIBGTOP_SERVER, NULL); + execl (LIBGTOP_SERVER, "libgtop-server", NULL); glibtop_error_io_r (server, "execl (%s)", LIBGTOP_SERVER); _exit (2);