🚀 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 David Holland Sun, 01 Nov 2026 19:22
Re: Proposal: getexecpath(3)
#65
Author: David Holland
Date: Sun, 01 Nov 2026 19:22
27 lines
2884 bytes
also since this thread came back to life:

On Mon, Jan 06, 2025 at 05:26:05PM -0500, Rob Whitlock wrote:
 > >> Also all argv[] strings can be modifiable by callee. pathname of the
 > >> execution (as passed to execve(2) or like) is not.
 > > 
 > > So?
 > > 
 > > (also, that's UB in C so the traditional Unix behavior is not by any
 > > means guaranteed, and on NetBSD you should be using setproctitle(3)
 > > for that instead anyhow)
 > 
 > What exactly is UB in C? Since execve(2) is not part of ANSI/ISO C,
 > I presume you might be talking about modification of the argv[]
 > strings? But that is explicitly allowed, and not UB.

Apparently I had it in my head that modifying argv strings isn't
allowed, and that allowing it was a sketchy Unix extension, but in
fact it is. (C&V: C99 5.1.2.2.1 #2)

-- 
David A. Holland
dholland@netbsd.org

--
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