Article View: muc.lists.netbsd.tech.userlevel
Article #40Re: Proposal: getexecpath(3)
From: Brad Smith
Date: Mon, 26 Oct 2026 06:48
Date: Mon, 26 Oct 2026 06:48
27 lines
3137 bytes
3137 bytes
On 2026-10-25 6:02 a.m., Martin Husemann wrote: > On Sun, Oct 25, 2026 at 04:20:57AM -0400, Brad Smith wrote: >> I know this is not quite what you are looking for, but FYI, OpenBSD >> has since added a getexecpath(3) to libc, first appearing in >> OpenBSD 8.0: >> >> https://man.openbsd.org/getexecpath.3 >> >> Unlike NetBSD, OpenBSD did not even have a sysctl like >> KERN_PROC_PATHNAME to fall back on, so software was left guessing >> from argv[0]. That said, after looking through many open source >> projects, I see a lot of them have not been updated to use NetBSD's >> sysctl either. > See also: > > https://nxr.netbsd.org/xref/src/crypto/external/bsd/openssh/dist/getexecpath.c > > It doesn't do the sysctl fallback either. > > Martin Looking at AT_SUN_EXECNAME, that does look proper. -- Posted automagically by a mail2news gateway at muc.de e.V. Please direct questions, flames, donations, etc. to news-admin@muc.de
Technical Details
Message-ID:
<457c61b9-b997-45fd-baaa-3386da525bf2@comstyle.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.space.net!news.muc.de!.POSTED.news.muc.de!not-for-mailReferences:
<> <at3T0g049zwuMXpJ@big-apple.aprisoft.de>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.space.net!news.muc.de!.POSTED.news.muc.de!not-for-mail From: Brad Smith <brad@comstyle.com> Newsgroups: muc.lists.netbsd.tech.userlevel Subject: Re: Proposal: getexecpath(3) Date: Mon, 26 Oct 2026 02:48:36 -0400 Organization: Newsgate at muc.de e.V. Sender: tech-userlevel-owner@NetBSD.org Approved: news-admin@muc.de Distribution: world Message-ID: <457c61b9-b997-45fd-baaa-3386da525bf2@comstyle.com> References: <> <at3T0g049zwuMXpJ@big-apple.aprisoft.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2"; logging-data="41821"; mail-complaints-to="news-admin@muc.de" User-Agent: Mozilla Thunderbird Authentication-Results: mail.netbsd.org (amavisd-new); dkim=pass (1024-bit key) header.d=comstyle.com; domainkeys=pass (1024-bit key) header.from=brad@comstyle.com header.d=comstyle.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=comstyle.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s=default; bh=AlkZbnYO96+i/vptqjMifWLHxCkdCm0kD2h8dksOIs4=; b=SAyTh/U6wq1Z b5nWmwEcfRNwvyAhkj+FQ+wgcwBkwa9wc0qmIywpdkGsWT9cfIE93cc2RykHfgIX 2Qebm+aq0WsWLnKk6xsWT8mg19F6tTDOMhmUBj249abuG75FQUB2AW/VQU8nUY4B mEG7hu+3i0Qo8INS046MscbkflHKLds= DomainKey-Signature: a=rsa-sha1; c=nofws; d=comstyle.com; h=message-id :date:mime-version:subject:to:cc:references:from:in-reply-to :content-type:content-transfer-encoding; q=dns; s=default; b=EZ4 slUzSLaNmNWu/i4y9/KkBg461tj4HkPzwsCKvfJiAFdIqunLRAUX60XeXEZjeRwW H5zMzPGuPkYNgKgdDzA7xup1PvwsMhsHfYuaAZ9a+bFonDjSazmxmFEYho3TVwfL wnPzsZsYC+Nv+/D/RdjIIAndIdyRzXRFDUXcdiSY= Content-Language: en-US In-Reply-To: <at3T0g049zwuMXpJ@big-apple.aprisoft.de> Precedence: bulk X-Newsgate-Id: f02c70b8849f+ X-No-Archive: Yes