🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: muc.lists.netbsd.tech.userlevel
Article #65

Re: Proposal: getexecpath(3)

#65
From: 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
Technical Details
Message-ID: <aueRYHyzYFr0J3rP@netbsd.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!2.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
References: <> <2EDCECFF-9F1A-426F-AD36-0D57793C6233@gmail.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!2.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: David Holland <dholland-tech@netbsd.org>
Newsgroups: muc.lists.netbsd.tech.userlevel
Subject: Re: Proposal: getexecpath(3)
Date: Sun, 1 Nov 2026 19:22:08 +0000
Organization: Newsgate at muc.de e.V.
Sender: tech-userlevel-owner@NetBSD.org
Approved: news-admin@muc.de
Distribution: world
Message-ID: <aueRYHyzYFr0J3rP@netbsd.org>
References: <> <2EDCECFF-9F1A-426F-AD36-0D57793C6233@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2";
	logging-data="42763"; mail-complaints-to="news-admin@muc.de"
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netbsd.org;
	s=20240131; t=1793560930;
	bh=UCyQYQb9KY+RGgweyYWTbwdqmZWEO/TDKOq2yJgZSdQ=;
	h=Date:From:Cc:Subject:References:In-Reply-To:List-Id:
	 List-Unsubscribe;
	b=TjIBUOyf/voHjp2gwFe59fiPKIKBIYk54+ZPIgvbzUN0hNxJnJItrES58iSy95Lza
	 ++9EOKoNvSkJOgRyCTPQCGUbc9fVyOUW9IicLOaqYXC7/hgo/mHDgxnL0Kdb8oOufC
	 9ak0Wu8LeazBLTrICdizoYXif5BVS/sl53Xk5IRI=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netbsd.org;
	s=20240131; t=1793560928;
	bh=UCyQYQb9KY+RGgweyYWTbwdqmZWEO/TDKOq2yJgZSdQ=;
	h=Date:From:Cc:Subject:References:In-Reply-To;
	b=E/BOMRe5d/L/pTwLC+fa184WEyEajkF5YT4AM8AIJDiu7XPBJ5AEw7igJ3Ma712GD
	 M8N++XoMjWbebIM98nRmsXNmSkqjKxjdF9KrKn4K/t1mwKstTyNZ1TivF/0jD8x6v0
	 leOiTTL7gWsYGxsXTpkFkd5v7WUN47CluqrZae8U=
Content-Disposition: inline
In-Reply-To: <2EDCECFF-9F1A-426F-AD36-0D57793C6233@gmail.com>
Precedence: bulk
X-Newsgate-Id: f02c70b8849f+
X-No-Archive: Yes