Public bug reported:

Doing tests with command-not-found using bash, I modified the value of PATH 
variable in order to always have the situation of commands not found. So I give 
the value of the current directory "." for PATH value. But in this case, it can 
lead to a bad behaviour, with an infinite loop and high usage of cpu and memory.
This seems to be due to that /usr/bin directory is not in PATH and with 
/etc/bash_command_not_found sourced. If the command_not_found_handle function 
is sourced from /etc/bash.bashrc, there is no problem.
The difference is in  /etc/bash.bashrc command-not-found is invoked with full 
path (/usr/bin/command-not-found) whereas in /etc/bash_command_not_found it is 
not.
So, in the particular case we use /etc/bash_command_not_found to be sourced for 
command_not_found_handle function and PATH value does not contain /usr/bin 
where command-not-found is located, the problem occurs.

** Affects: command-not-found (Ubuntu)
     Importance: Undecided
         Status: Unconfirmed

-- 
bad behaviour according to PATH variable value in a particular case
https://bugs.launchpad.net/bugs/111255
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to