This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]