aboutsummaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2021-01-31 12:23:42 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2021-01-31 16:07:19 +0000
commit46f168bc665a1aee79d91bd102aef7d4754e7917 (patch)
tree33046b0889890e9d15cb03498740bf50b020aee9 /lib/libc
parentb24872cf7b13314669ed2136c0262bb2eb007695 (diff)
downloadsrc-46f168bc665a1aee79d91bd102aef7d4754e7917.tar.gz
src-46f168bc665a1aee79d91bd102aef7d4754e7917.zip
Drop temporary compat in setproctitle
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/gen/setproctitle.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/lib/libc/gen/setproctitle.c b/lib/libc/gen/setproctitle.c
index 991af38565cd..3f858952255c 100644
--- a/lib/libc/gen/setproctitle.c
+++ b/lib/libc/gen/setproctitle.c
@@ -185,17 +185,7 @@ setproctitle_fast(const char *fmt, ...)
oid[1] = KERN_PROC;
oid[2] = KERN_PROC_ARGS;
oid[3] = -1;
- if (sysctl(oid, 4, 0, 0, "", 0) != 0) {
- /*
- * Temporary compat for kernels which don't support
- * passing -1.
- */
- oid[0] = CTL_KERN;
- oid[1] = KERN_PROC;
- oid[2] = KERN_PROC_ARGS;
- oid[3] = getpid();
- sysctl(oid, 4, 0, 0, "", 0);
- }
+ sysctl(oid, 4, 0, 0, "", 0);
fast_update = 1;
}
}
@@ -217,17 +207,7 @@ setproctitle(const char *fmt, ...)
oid[1] = KERN_PROC;
oid[2] = KERN_PROC_ARGS;
oid[3] = -1;
- if (sysctl(oid, 4, 0, 0, buf, strlen(buf) + 1) != 0) {
- /*
- * Temporary compat for kernels which don't support
- * passing -1.
- */
- oid[0] = CTL_KERN;
- oid[1] = KERN_PROC;
- oid[2] = KERN_PROC_ARGS;
- oid[3] = getpid();
- sysctl(oid, 4, 0, 0, buf, strlen(buf) + 1);
- }
+ sysctl(oid, 4, 0, 0, buf, strlen(buf) + 1);
fast_update = 0;
}
}