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

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Pierre A. Humblet-2
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
window)
  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
drives.

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
issues

Pierre
 

Reply | Threaded
Open this post in threaded view
|

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

Corinna Vinschen-2
On Jun 28 04:44, Pierre A. Humblet wrote:

> 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 window)
>  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
> drives.
>
> 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 issues

- Tell user not to set HOME=/

Corinna

--
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat