From cf0a39401da73d01cdbce0a037d078e3b6bc9f42 Mon Sep 17 00:00:00 2001 From: Brian Somers Date: Wed, 17 Nov 1999 21:12:35 +0000 Subject: Fix ``set proctitle'' by using setproctitle(). --- usr.sbin/ppp/command.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'usr.sbin/ppp/command.c') diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c index 47a83e0b2935..4096597217c4 100644 --- a/usr.sbin/ppp/command.c +++ b/usr.sbin/ppp/command.c @@ -33,6 +33,11 @@ #include #include #include +#ifdef __OpenBSD__ +#include +#else +#include +#endif #include #include #include @@ -87,6 +92,7 @@ #include "cbcp.h" #include "datalink.h" #include "iface.h" +#include "id.h" /* ``set'' values */ #define VAR_AUTHKEY 0 @@ -2609,8 +2615,7 @@ SetProcTitle(struct cmdargs const *arg) int len, remaining, f, argc = arg->argc - arg->argn; if (arg->argc == arg->argn) { - arg->bundle->argv[0] = arg->bundle->argv0; - arg->bundle->argv[1] = arg->bundle->argv1; + ID0setproctitle(NULL); return 0; } @@ -2636,8 +2641,7 @@ SetProcTitle(struct cmdargs const *arg) } *ptr = '\0'; - arg->bundle->argv[0] = title; - arg->bundle->argv[1] = NULL; + ID0setproctitle(title); return 0; } -- cgit v1.3