Problem when HOME=/ [ncurses, less, .... ]

Pierre A. Humblet
Wed Jun 28 08:46:00 GMT 2006

A number of programs are very slow or don't work when HOME=/

The problems can be traced to things like (e.g. when starting bash in a command 
  482  144483 [main] bash 4448 normalize_posix_path: src //.terminfo/c/cygwin

or with less, which doesn't seem to work at all
  48 10289507 [main] less 3464 normalize_posix_path: //.less = 
normalize_posix_path (//.less)

The source lies in constructions such as printf ("%s/.less", HOME)
which create pathnames starting with  //  and thus interpreted as network 

This also cause some kind of exception within Cygwin
   415 6905204 [WNetGetResourceInformation] bash 4448 cygthread::stub: thread 
'WNetGetResourceInformation', id 0x1520, stack_ptr 0x18DCEEF0
--- Process 4448, exception 000006BA at 7C81EB33

I can only suggest two possible fixes:
- ask all maintainers to check how HOME is used in their programs
- modify Cygwin to set HOME to '///' when it is '/'
  This is ugly but will fix the problem for all programs, perhaps creating other 


More information about the Cygwin-apps mailing list