On Apr 7 13:34, Brian Inglis wrote: > ISTM anomalous that for cygrunsrv, daemons, cron processes, and shells > /proc/<pid>/{cwd,root} have bad symlinks to "<defunct>", normally a process > or exe status: > > /proc/732/exe -> /usr/bin/cygrunsrv > /proc/732/root -> <defunct> > /proc/732/cwd -> <defunct> > | /proc/733/exe -> /usr/sbin/cygserver > ->/proc/733/root -> <defunct> > /proc/733/cwd -> <defunct> > /proc/740/exe -> /usr/bin/cygrunsrv > /proc/740/root -> <defunct> > /proc/740/cwd -> <defunct> > | /proc/741/exe -> /usr/sbin/syslog-ng > ->/proc/741/root -> <defunct> > /proc/741/cwd -> <defunct> > /proc/748/exe -> /usr/bin/cygrunsrv > /proc/748/root -> <defunct> > /proc/748/cwd -> <defunct> > | /proc/749/exe -> /usr/sbin/cron > ->/proc/749/root -> <defunct> > /proc/749/cwd -> <defunct> > | /proc/2080/exe -> /usr/sbin/cron > ->/proc/2080/root -> <defunct> > /proc/2080/cwd -> <defunct> > | /proc/2082/exe -> /usr/bin/bash > ->/proc/2082/root -> <defunct> > /proc/2082/cwd -> <defunct> > > Should we consider changing that to root "/", or nothing, null, or something > meaningful?
That's typically a permission problem. On Linux you get something like ls: cannot read symbolic link '/proc/1/cwd': Permission denied But on Cygwin the content of those links require to open the processes' signal pipe and send/receive a message containing the information. I didn't look into the code for a while but it seems we don't check why we couldn't connect to a process to fetch the info. IIRC the current fhandler_process framework doesn't have a way to communicate that info. If you want to change that, feel free! Corinna