Are there any changes to the access control to /proc/<PID>/fd/1 in cygwin 3?

Till Riedel riedel@teco.edu
Sat Jun 15 18:28:00 GMT 2019


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



More information about the Cygwin mailing list