🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: muc.lists.netbsd.tech.userlevel
1 messages
1 total messages Started by Brad Smith Mon, 26 Oct 2026 06:48
Re: Proposal: getexecpath(3)
#40
Author: Brad Smith
Date: Mon, 26 Oct 2026 06:48
27 lines
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads