public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
From: Ken Brown <kbrown@cornell.edu>
To: cygwin-patches@cygwin.com
Subject: Re: [PATCH] Cygwin: spawn: Treat empty path as the current directory.
Date: Thu, 30 Jun 2022 11:45:28 -0400	[thread overview]
Message-ID: <c4a8d150-4d16-2af5-a7ac-26e42f9befb8@cornell.edu> (raw)
In-Reply-To: <20220627124427.184-1-takashi.yano@nifty.ne.jp>

On 6/27/2022 8:44 AM, Takashi Yano wrote:
> - With this patch, the empty path (empty element in PATH or PATH is
>    absent) is treated as the current directory as Linux does.
> Addresses: https://cygwin.com/pipermail/cygwin/2022-June/251730.html

It might be a good idea to include a comment in the code and the commit message 
that this feature is being added for Linux compatibility but that it is 
deprecated.  According to https://man7.org/linux/man-pages/man7/environ.7.html,

               As a legacy feature, a zero-length prefix (specified as
               two adjacent colons, or an initial or terminating colon)
               is interpreted to mean the current working directory.
               However, use of this feature is deprecated, and POSIX
               notes that a conforming application shall use an explicit
               pathname (e.g., .)  to specify the current working
               directory.

Alternatively, maybe this is a case where we should prefer POSIX compliance to 
Linux compatibility.  Corinna, WDYT?

Ken

  reply	other threads:[~2022-06-30 15:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-27 12:44 Takashi Yano
2022-06-30 15:45 ` Ken Brown [this message]
2022-06-30 18:35   ` [EXTERNAL] " Lavrentiev, Anton (NIH/NLM/NCBI) [C]
2022-06-30 19:03     ` Brian Inglis
2022-06-30 19:04     ` Takashi Yano
2022-07-01  1:16   ` Ken Brown
2022-07-01 23:31     ` Takashi Yano
2022-07-02  1:32       ` Ken Brown
2022-07-04  8:37         ` Corinna Vinschen
2022-07-04 23:05           ` Ken Brown
2022-07-05  4:54             ` Takashi Yano

Reply instructions:

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

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

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c4a8d150-4d16-2af5-a7ac-26e42f9befb8@cornell.edu \
    --to=kbrown@cornell.edu \
    --cc=cygwin-patches@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).