public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Till Riedel <riedel@teco.edu>
To: cygwin@cygwin.com
Subject: Are there any changes to the access control to /proc/<PID>/fd/1 in cygwin 3?
Date: Sat, 15 Jun 2019 18:28:00 -0000	[thread overview]
Message-ID: <a0527553-ef09-60dd-5019-7278c5f12835@teco.edu> (raw)

Hi,

I have been using a very handy sudo hack, that broke lately (I think) 
when updating cygwin: https://github.com/imachug/win-sudo

The trick is to spawn an elevated process using powershell and hook up 
the calling file descripters. I now get "write error: Bad file descriptor"

To reproduce call:

powershell.exe Start-Process bash  \"-c\",\"\'echo \>\>/proc/$$/fd/1 hello world\;sleep 10\'\"

IMHO this used to work in former versions (print out hello world on the 
calling shell). Strangely

bash -c "echo >/proc/$$/fd/1 hello world"

works. So my initial guess is that is has to do with the decoupling of 
Cygwin PIDs from Windows PIDs, but there were also changes in the proc 
file system...

Thanks a lot in advance for any help/thoughts!

BR

Till


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

             reply	other threads:[~2019-06-15 18:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-15 18:28 Till Riedel [this message]
2019-06-16 15:42 ` Brian Inglis
2019-06-20 19:49   ` Till Riedel [TM]
2019-06-20 20:09     ` Till Riedel [TM]

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=a0527553-ef09-60dd-5019-7278c5f12835@teco.edu \
    --to=riedel@teco.edu \
    --cc=cygwin@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).