public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin-patches@cygwin.com
Subject: Re: /proc/<pid>/{cwd, root} links to <defunct> for cygrunsrv, daemons, and shells
Date: Tue, 9 Apr 2024 23:24:49 +0200	[thread overview]
Message-ID: <ZhWyIZYJVRrzmvJO@calimero.vinschen.de> (raw)
In-Reply-To: <8180fe90-776b-4ba0-9752-09186a08d771@SystematicSW.ab.ca>

On Apr  9 10:38, Brian Inglis wrote:
> On 2024-04-09 07:08, Corinna Vinschen wrote:
> > That's typically a permission problem.  On Linux you get something like
> > 
> >    ls: cannot read symbolic link '/proc/1/cwd': Permission denied
> 
> Thanks Corinna,
> 
> That now makes sense, as Cygwin ps -a and btop showed the processes,
> although procps and top did not, and other info is visible, I never thought
> about permissions as there were links, but I see from elevated admin sh:
> [...]
> so I think perms on these should be 440 or 550 not 444 or 555, but that may
> involve a lot of work to decide that for each entry?

Not really.  Have a look into fhandler/proc.cc, fhandler/process.cc,
etc.  We can add a permisions member to struct virt_tab_t and add
this as static info to every member in the list.  Doesn't sound overly
complicated to me (*nudge, nudge*).

Changing <defunct> to a "Permission denied" when trying to open a
virtual symlink may be a bit more involved, but maybe not very much.


Corinna

      reply	other threads:[~2024-04-09 21:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-07 19:34 /proc/<pid>/{cwd,root} " Brian Inglis
2024-04-09 13:08 ` /proc/<pid>/{cwd, root} " Corinna Vinschen
2024-04-09 16:38   ` Brian Inglis
2024-04-09 21:24     ` Corinna Vinschen [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=ZhWyIZYJVRrzmvJO@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --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).