Article View: muc.lists.netbsd.tech.userlevel
Article #44Re: Proposal: getexecpath(3)
From: Mouse
Date: Mon, 26 Oct 2026 23:12
Date: Mon, 26 Oct 2026 23:12
27 lines
2675 bytes
2675 bytes
>>> You can always pass the original verbatim exec path to realpath(3) >>> if you want to canonicalize it, >> True, though that - at best - returns the hard path at the time of >> realpath (or more precisely with pieces fetched at various times >> scattered throughout the execution of realpath), which may not be >> the same as the one at the time of exec. > If the path resolution may have concurrently changed between the > execve call and the realpath call, it may as well have concurrently > changed between the execve call and the open call. Good point. Since (at least as far as I recall) we don't know why anyone (putatively) wants the original path, we don't know whether this matters. But for most likely purposes I would expect it would. Maybe what this wants is a way to flag the executable such that it automatically gets something like a descriptor open on the directory containing the executable? I'm not sure that's quite the right semantic, but maybe it's close enough to be a useful starting point. /~\ The ASCII Mouse \ / Ribbon Campaign X Against HTML mouse@rodents-montreal.org / \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B -- 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:
<202610262312.TAA09309@Stone.Rodents-Montreal.ORG>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:
<20261026121701.83CF784D39@mail.netbsd.org>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: Mouse <mouse@Rodents-Montreal.ORG> Newsgroups: muc.lists.netbsd.tech.userlevel Subject: Re: Proposal: getexecpath(3) Date: Mon, 26 Oct 2026 19:12:42 -0400 (EDT) Organization: Newsgate at muc.de e.V. Sender: tech-userlevel-owner@NetBSD.org Approved: news-admin@muc.de Distribution: world Message-ID: <202610262312.TAA09309@Stone.Rodents-Montreal.ORG> References: <20261026121701.83CF784D39@mail.netbsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2"; logging-data="44345"; mail-complaints-to="news-admin@muc.de" X-Erik-Conspiracy: There is no Conspiracy - and if there were I wouldn't be part of it anyway. X-Message-Flag: Microsoft: the company who gave us the botnet zombies. X-Composition-Start-Date: Mon, 26 Oct 2026 19:00:43 -0400 (EDT) In-Reply-To: <20261026121701.83CF784D39@mail.netbsd.org> Precedence: bulk X-Newsgate-Id: f02c70b8849f+ X-No-Archive: Yes