Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > muc.lists.netbsd.tech.userlevel > #11998
| From | David Holland <dholland-tech@netbsd.org> |
|---|---|
| Newsgroups | muc.lists.netbsd.tech.userlevel |
| Subject | Re: Proposal: getexecpath(3) |
| Date | 2026-11-01 19:22 +0000 |
| Organization | Newsgate at muc.de e.V. |
| Message-ID | <aueRYHyzYFr0J3rP@netbsd.org> (permalink) |
| References | <> <2EDCECFF-9F1A-426F-AD36-0D57793C6233@gmail.com> |
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
Back to muc.lists.netbsd.tech.userlevel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: Proposal: getexecpath(3) David Holland <dholland-tech@netbsd.org> - 2025-01-06 02:24 +0000
Re: Proposal: getexecpath(3) <tlaronde@kergis.com> - 2025-01-06 09:38 +0100
Re: Proposal: getexecpath(3) Rob Whitlock <rwhitlock22@gmail.com> - 2025-01-06 17:26 -0500
Re: Proposal: getexecpath(3) David Holland <dholland-tech@netbsd.org> - 2026-11-01 19:22 +0000
csiph-web