Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Feb 2021 12:41:09 GMT
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 71b460513827 - stable/13 - Drop temporary compat in setproctitle
Message-ID:  <202102011241.111Cf9TX098522@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by mjg:

URL: https://cgit.FreeBSD.org/src/commit/?id=71b460513827a730c4e5dbf0c9a8eb3a18a95112

commit 71b460513827a730c4e5dbf0c9a8eb3a18a95112
Author:     Mateusz Guzik <mjg@FreeBSD.org>
AuthorDate: 2021-01-31 12:23:42 +0000
Commit:     Mateusz Guzik <mjg@FreeBSD.org>
CommitDate: 2021-02-01 12:39:19 +0000

    Drop temporary compat in setproctitle
    
    (cherry picked from commit 46f168bc665a1aee79d91bd102aef7d4754e7917)
---
 lib/libc/gen/setproctitle.c | 24 ++----------------------
 1 file 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;
 	}
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202102011241.111Cf9TX098522>