supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: "Laurent Bercot" <ska-supervision@skarnet.org>
To: Supervision <supervision@list.skarnet.org>
Subject: Re: Handle ENOTDIR in pathexec_run
Date: Wed, 19 Feb 2020 10:14:02 +0000	[thread overview]
Message-ID: <em0428d595-151f-4eba-bce7-4bb971ec2835@elzian> (raw)
In-Reply-To: <5afb3f20-239b-f09a-c696-fe36d141b2cd@ntlworld.com>

>Simply put: One wants to (largely) ignore the error if there's a problem with the directory prefix from the search path; and one wants to retain the error if there's a problem with the final pathname component, the name that is being searched for or the actual node that it names.  Unfortunately, execve() can return EACCESS in both cases, and simply deciding to exit the loop based upon nothing but the errno value is therefore an unworkable strategy.

Can you elaborate why you need to differentiate between error in the
directory prefix and error in the final pathname component? Why do you
think that retaining the error (and failing the pathexec) is better if
there is a problem with the final pathname component? IMO, if the
binary there is unsuitable for executing, it makes sense to move on
to the next path.

I'm going to add ENOTDIR support to the skalibs' pathexec_run; I'm
interested in knowing why you think it's not good enough.

--
Laurent



      parent reply	other threads:[~2020-02-19 10:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-11 17:00 Jacob Vosmaer via supervision
2020-02-19  8:18 ` Jonathan de Boyne Pollard
     [not found] ` <5afb3f20-239b-f09a-c696-fe36d141b2cd@ntlworld.com>
2020-02-19 10:14   ` Laurent Bercot [this message]

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=em0428d595-151f-4eba-bce7-4bb971ec2835@elzian \
    --to=ska-supervision@skarnet.org \
    --cc=supervision@list.skarnet.org \
    /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 NNTP newsgroup(s).