Calling man from nonexistent directory cause fatal error

cyg Simple
Tue Jan 20 14:02:00 GMT 2015

> From: Andrey Repin
> I was doing some cleanup, and accidentally left Cygwin terminal hanging in
> directory I've since deleted.
> When trying to reference bash manual from there, the thing all went down
> flames of
> $ man bash
> man: can't change directory to '/home/anrdaemon/1': Permission denied
> man: command exited with status 255: (cd /home/anrdaemon/1 && LESS=-
> ix8RmPm Manual page bash(1) ?ltline %lt?L/%L.:byte %bB?s/%s..?e (END):?pB
> %pB\%.. (press h for help or q to quit)$PM Manual page bash(1) ?ltline
> %lt?L/%L.:byte %bB?s/%s..?e (END):?pB %pB\%.. (press h for help or q to
> MAN_PN=bash(1) less -s)
> Is this expected behavior? Why it is trying to chdir anywhere, anyway?
> I can reproduce this from both local and remote filesystems.

I imagine that Cygwin is trying to put the child processes in the same
working directory which no longer exists.  On a real *NIX the directory
would not have actually been deleted until the last process had released its
connections to the directory.  That doesn't happen on Windows.  The only fix
I can think is for Cygwin to hold open the directory of the CWD but that has
other side effects such as not being able to delete the directory.

cyg Simple

Problem reports:
Unsubscribe info:

More information about the Cygwin mailing list