blob: 3391d9481f72b3a9c0956457c6f42c87cf489f9b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
$NetBSD: patch-lib_setproctitle.c,v 1.2 2017/11/23 20:27:20 wiz Exp $
Remove setproctitle, conflicts with NetBSD version and not used
in mcookie.
--- lib/setproctitle.c.orig 2017-09-27 09:05:13.698361518 +0000
+++ lib/setproctitle.c
@@ -49,27 +49,3 @@ void initproctitle (int argc, char **arg
if (argv_lth > 1)
argv0 = argv;
}
-
-void setproctitle (const char *prog, const char *txt)
-{
- size_t i;
- char buf[SPT_BUFSIZE];
-
- if (!argv0)
- return;
-
- if (strlen(prog) + strlen(txt) + 5 > SPT_BUFSIZE)
- return;
-
- sprintf(buf, "%s -- %s", prog, txt);
-
- i = strlen(buf);
- if (i > argv_lth - 2) {
- i = argv_lth - 2;
- buf[i] = '\0';
- }
- memset(argv0[0], '\0', argv_lth); /* clear the memory area */
- strcpy(argv0[0], buf);
-
- argv0[1] = NULL;
-}
|