Drop temporary compat in setproctitle

This commit is contained in:
Mateusz Guzik 2021-01-31 13:23:42 +01:00
parent b24872cf7b
commit 46f168bc66

View File

@ -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;
}
}