bug-coreutils
[Top][All Lists]
Advanced

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

bug#29939: HELP:enter a "ls"command, then the os connection will closed


From: Bernhard Voelker
Subject: bug#29939: HELP:enter a "ls"command, then the os connection will closed
Date: Wed, 3 Jan 2018 14:11:57 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0

On 01/02/2018 07:25 AM, address@hidden wrote:
>     When I enter a "ls " command at the directory "/root",the OS connection 
> will closed.

are you sure "ls" is /usr/bin/ls?

  $ type ls
  ls is /usr/bin/ls

I.e., it could be aliased to something weird, e.g. a shell function which
calls '/usr/bin/ls' under the hood but "exit"s in certain cases:

  $ _ls() { /usr/bin/ls ${1+"$@"} | grep . || exit; }

  $ alias ls=_ls

  $ type ls
  ls is aliased to `_ls'

  $ ls
  bin
  file
  home
  ...

  $ ls ENOENT
  /usr/bin/ls: cannot access 'ENOENT': No such file or directory
  logout

Other than that, I don't see how the spawned 'ls' process could lead
to a logout of the calling shell process.

Have a nice day,
Berny





reply via email to

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