bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

command_not_found_handle strange behaviour


From: Кириллов Дима
Subject: command_not_found_handle strange behaviour
Date: Wed, 28 Mar 2018 18:42:21 +0300

Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-unknown-linux-gnu' 
-DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' 
-DSHELL -DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib  -D_FORTIFY_SOURCE=2 
-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt 
-DDEFAULT_PATH_VALUE='/usr/local/sbin:/usr/local/bin:/usr/bin' 
-DSTANDARD_UTILS_PATH='/usr/bin' -DSYS_BASHRC='/etc/bash.bashrc' 
-DSYS_BASH_LOGOUT='/etc/bash.bash_logout' -DNON_INTERACTIVE_LOGIN_SHELLS 
-Wno-parentheses -Wno-format-security
uname output: Linux articunoIceCave 4.15.13-1-ARCH #1 SMP PREEMPT Sun Mar 25 
11:27:57 UTC 2018 x86_64 GNU/Linux
Machine Type: x86_64-unknown-linux-gnu

Bash Version: 4.4
Patch Level: 19
Release Status: release

Description:
        I can't understand why read works without subshell before it, 
but with subshell before read it stops

    command_not_found_handle()
    {
        (true) # subshell call
        read line
        echo "$line"
    }

  bash-4.4$ foo
  
  [1]+  Stopped                 foo

And without subshell call it works fine:

    command_not_found_handle()
    {
          read line
          echo "$line"
    }

  bash-4.4$ foo
  smth
  smth
  bash-4.4$ 

Repeat-By:
        call some command which doesn't exist with different handlers

-- 
Кириллов Дмитрий




reply via email to

[Prev in Thread] Current Thread [Next in Thread]