diff options
author | brian <brian@FreeBSD.org> | 1999-11-17 21:12:35 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1999-11-17 21:12:35 +0000 |
commit | 23eed7f7102ef9456a9439cb6bc98763c375d65b (patch) | |
tree | e9a6cb680ab641034bfd98b66123c4e69198cbfe /usr.sbin/ppp/bundle.c | |
parent | a6dfb66b8f373dfb4e877586559df92a05a6cea1 (diff) | |
download | FreeBSD-src-23eed7f7102ef9456a9439cb6bc98763c375d65b.zip FreeBSD-src-23eed7f7102ef9456a9439cb6bc98763c375d65b.tar.gz |
Fix ``set proctitle'' by using setproctitle().
Diffstat (limited to 'usr.sbin/ppp/bundle.c')
-rw-r--r-- | usr.sbin/ppp/bundle.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/ppp/bundle.c b/usr.sbin/ppp/bundle.c index dcc07f2..18a0ff1 100644 --- a/usr.sbin/ppp/bundle.c +++ b/usr.sbin/ppp/bundle.c @@ -39,6 +39,11 @@ #include <errno.h> #include <fcntl.h> +#ifdef __OpenBSD__ +#include <util.h> +#else +#include <libutil.h> +#endif #include <paths.h> #include <stdio.h> #include <stdlib.h> @@ -603,7 +608,7 @@ bundle_UnlockTun(struct bundle *bundle) } struct bundle * -bundle_Create(const char *prefix, int type, int unit, const char **argv) +bundle_Create(const char *prefix, int type, int unit) { static struct bundle bundle; /* there can be only one */ int enoentcount, err, minunit, maxunit; @@ -673,9 +678,6 @@ bundle_Create(const char *prefix, int type, int unit, const char **argv) } log_SetTun(bundle.unit); - bundle.argv = argv; - bundle.argv0 = argv[0]; - bundle.argv1 = argv[1]; ifname = strrchr(bundle.dev.Name, '/'); if (ifname == NULL) @@ -1097,7 +1099,6 @@ bundle_ShowStatus(struct cmdargs const *arg) int remaining; prompt_Printf(arg->prompt, "Phase %s\n", bundle_PhaseName(arg->bundle)); - prompt_Printf(arg->prompt, " Title: %s\n", arg->bundle->argv[0]); prompt_Printf(arg->prompt, " Device: %s\n", arg->bundle->dev.Name); prompt_Printf(arg->prompt, " Interface: %s @ %lubps", arg->bundle->iface->name, arg->bundle->bandwidth); @@ -1660,8 +1661,7 @@ bundle_setsid(struct bundle *bundle, int holdsession) */ waitpid(pid, &status, 0); /* Tweak our process arguments.... */ - bundle->argv[0] = "session owner"; - bundle->argv[1] = NULL; + ID0setproctitle("session owner"); /* * Hang around for a HUP. This should happen as soon as the * ppp that we passed our ctty descriptor to closes it. |