mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
Drop temporary compat in setproctitle
This commit is contained in:
parent
b24872cf7b
commit
46f168bc66
1 changed files with 2 additions and 22 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue