Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q9ZFo-0002Og-7E for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Jun 2023 22:46:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q9ZFn-0007GO-3g for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Jun 2023 22:46:15 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q9ZFm-0007G6-Oi for pgsql-hackers@lists.postgresql.org; Wed, 14 Jun 2023 22:46:14 +0000 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1q9ZFj-002EpG-QJ for pgsql-hackers@postgresql.org; Wed, 14 Jun 2023 22:46:13 +0000 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1b3c578c602so29157765ad.2 for ; Wed, 14 Jun 2023 15:46:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686782771; x=1689374771; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=bNTkc9DFLX5T2NCqZVoSxIo+VrDb9h9r2HANhTKSyyE=; b=KIRdDQ0yPBXqUAwVV+bR6VvNQZTAEm3uJTkIRL4jULDRTedFOYCh02ixjN3x2aSuxO 7S78LZsQnzulRbxTymBi1YijpxswNUL+lxtDJlKV1r0cl/5as/1Yh2t0IOfy/FjPX0wy sO2vCwww/d9qbnE2fIHrjGjD5BRRnIz/Vm15CjPtMiLmvUq3IHJNPemUtvBxbX4Y53Hw 5hKCecVbvx6QAltCe6VhMGEG474VIwruo3Gw0uF+y/IzG8Ly9ULcnl2x1j+uEFL6z9ix CINljn1t6oyHyUHnR6fqVuU0hqXJolx09lcRhirAo0XnXd8jK+ZJJPzT1+OZEo8Fb1yN GtjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686782771; x=1689374771; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=bNTkc9DFLX5T2NCqZVoSxIo+VrDb9h9r2HANhTKSyyE=; b=cGIhcxyMCVEWvKA1gJlrC/LzFe4N2Kq/RNGUc/Oqq2rOTAVlGLrrc1XtO0U7i7IRYD JCV51J6R6XAMIpCLgib+HKNj+/Fesbdft7Xaxgpf03a3rXLOdH5ZZDkvDPcRmGFfwEaa XzA79k5uj4HITNThbQgC4yqhKjtH0tHExwr8j2itjBD4rXFpV9YNhm+ooHRM/Eb+GArz Da/hgjo6fJBDuScANLL8cLYoafesSZwDuCFlftpt3GzT0bzOsW6zN6qiSqFh4KTj6EK7 Cuxu3Ny+rZhOxV05DMfi0iXdNn/3wLT26VjhIC4+3d8XpWfKblmMADdV58MjyMbSYlfl Xq2Q== X-Gm-Message-State: AC+VfDyqT1quLHCNO3WBpXDYm60tSwKGzlABTGbp8qj2nmknk2HvVFxy upzFN5PQABB+BZdE6daHgVM= X-Google-Smtp-Source: ACHHUZ7Csatn0I2JLDgXDLlahKS3U+ay0tU/MoeYxxTYehEmoTZgAGGMLyurv3++fFqg01tsHMyFzw== X-Received: by 2002:a17:902:e74e:b0:1b3:8865:aaae with SMTP id p14-20020a170902e74e00b001b38865aaaemr15864317plf.53.1686782770929; Wed, 14 Jun 2023 15:46:10 -0700 (PDT) Received: from nathanxps13 ([50.47.162.83]) by smtp.gmail.com with ESMTPSA id q11-20020a170902a3cb00b001b077301a58sm4129066plb.79.2023.06.14.15.46.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jun 2023 15:46:10 -0700 (PDT) Date: Wed, 14 Jun 2023 15:46:08 -0700 From: Nathan Bossart To: Noah Misch Cc: Michael Paquier , Kyotaro Horiguchi , pgsql-hackers@postgresql.org Subject: Re: add non-option reordering to in-tree getopt_long Message-ID: <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> <20230614001737.GB1607568@rfd.leadboat.com> <20230614212816.GA492731@nathanxps13> <20230614221154.GA1656253@rfd.leadboat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230614221154.GA1656253@rfd.leadboat.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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