pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Noah Misch <noah@leadboat.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: add non-option reordering to in-tree getopt_long
Date: Wed, 14 Jun 2023 15:46:08 -0700
Message-ID: <20230614224608.GA625054@nathanxps13> (raw)
In-Reply-To: <20230614221154.GA1656253@rfd.leadboat.com>
References: <20230609232257.GA121461@nathanxps13>
	<20230613.120001.2091320520660271559.horikyota.ntt@gmail.com>
	<20230613051343.GA211254@nathanxps13>
	<20230613.160201.833376179512503274.horikyota.ntt@gmail.com>
	<20230613223657.GC219055@nathanxps13>
	<ZIkBOzE8LBx1Ec7q@paquier.xyz>
	<ZIkDynQcrtFoXs5c@paquier.xyz>
	<20230614001737.GB1607568@rfd.leadboat.com>
	<20230614212816.GA492731@nathanxps13>
	<20230614221154.GA1656253@rfd.leadboat.com>

On Wed, Jun 14, 2023 at 03:11:54PM -0700, Noah Misch wrote:
> Here's some output from this program (on AIX 7.1, same output when compiled
> 32-bit or 64-bit):
> 
> $ ./a.out a b c d e f
> f e d c b a ./a.out

Thanks again.

> Interesting discussion here, too:
> https://github.com/libuv/libuv/pull/1187

Hm.  IIUC modifying the argv pointers on AIX will modify the process title,
which could cause 'ps' to temporarily show duplicate/missing arguments
during option parsing.  That doesn't seem too terrible, but if pointer
assignments aren't atomic, maybe 'ps' could be sent off to another part of
memory, which does seem terrible.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com





view thread (37+ messages)  latest in thread

Message-ID: <20230614224608.GA625054@nathanxps13>
Permalink:  ../20230614224608.GA625054@nathanxps13/
Also on:    postgresql.org/message-id/20230614224608.GA625054@nathanxps13

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: nathandbossart@gmail.com, noah@leadboat.com, michael@paquier.xyz, horikyota.ntt@gmail.com
  Subject: Re: add non-option reordering to in-tree getopt_long
  In-Reply-To: <20230614224608.GA625054@nathanxps13>
  References: <20230609232257.GA121461@nathanxps13> <20230613.120001.2091320520660271559.horikyota.ntt@gmail.com> <20230613051343.GA211254@nathanxps13> <20230613.160201.833376179512503274.horikyota.ntt@gmail.com> <20230613223657.GC219055@nathanxps13> <ZIkBOzE8LBx1Ec7q@paquier.xyz> <ZIkDynQcrtFoXs5c@paquier.xyz> <20230614001737.GB1607568@rfd.leadboat.com> <20230614212816.GA492731@nathanxps13> <20230614221154.GA1656253@rfd.leadboat.com> <20230614224608.GA625054@nathanxps13>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox