bug#29939: 回复: Re: bug#29939: HELP:enter a "ls"command, then the os connection will closed
Hi: Thank you for your response。 "ls" is /bin/ls the "/usr/bin/ls" is not exist Is there any log I can see to find the reason? Look forward to your reply。 中国联合网络通信有限公司 TV增值业务运营中心 李磊 Tel: 15620012157 Email:lil...@chinaunicom.cn 地址:天津市南开区南马路1151号2楼 发件人: Bernhard Voelker 发送时间: 2018-01-03 21:11 收件人: lil...@chinaunicom.cn; 29...@debbugs.gnu.org 主题: Re: bug#29939: HELP:enter a "ls"command, then the os connection will closed On 01/02/2018 07:25 AM, lil...@chinaunicom.cn 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
bug#29946: no -A argument for 'tr' generates an error message whenever the AIX command "lslpp -L" is used (AIX 6.1 and later).
Thanks for checking it; I installed it.
bug#29961: [PATCH] mv: document the missing atomicity of 'mv -n'
On Wed, Jan 3, 2018 at 8:27 AM, Kamil Dudka wrote: > On Wednesday, January 3, 2018 4:08:51 PM CET Pádraig Brady wrote: >> Eep, Seems like we should use RENAME_NOREPLACE in this case, >> rather than document the caveat? Good catch/fix. Thanks to both of you.
bug#29961: [PATCH] mv: document the missing atomicity of 'mv -n'
On Wednesday, January 3, 2018 4:08:51 PM CET Pádraig Brady wrote: > Eep, Seems like we should use RENAME_NOREPLACE in this case, > rather than document the caveat? Thanks for the suggestion! I will give it a try... Kamil > This is already used in shred. > > cheers, > Pádraig
bug#29961: [PATCH] mv: document the missing atomicity of 'mv -n'
On 03/01/18 15:01, Kamil Dudka wrote: > * src/mv.c (usage): Add note about the missing atomicity of 'mv -n'. > * doc/coreutils.texi (mv invocation): Likewise. > --- > doc/coreutils.texi | 3 +++ > src/mv.c | 2 ++ > 2 files changed, 5 insertions(+) > > diff --git a/doc/coreutils.texi b/doc/coreutils.texi > index 3fa083085..e7ca6a737 100644 > --- a/doc/coreutils.texi > +++ b/doc/coreutils.texi > @@ -9660,6 +9660,9 @@ If the response is not affirmative, the file is skipped. > Do not overwrite an existing file. > @mvOptsIfn > This option is mutually exclusive with @option{-b} or @option{--backup} > option. > +Note that the operation is not atomic. If @var{dest} appears after > +@command{mv} has checked its non-existence, it can be overwritten despite > +the @option{-n} option is used. > > @item -u > @itemx --update > diff --git a/src/mv.c b/src/mv.c > index a8df730a7..a08e75649 100644 > --- a/src/mv.c > +++ b/src/mv.c > @@ -306,6 +306,8 @@ Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.\n\ >-i, --interactiveprompt before overwrite\n\ >-n, --no-clobber do not overwrite an existing file\n\ > If you specify more than one of -i, -f, -n, only the final one takes > effect.\n\ > +NOTE: The operation is not atomic. If DEST appears after mv has checked > its\n\ > +non-existence, it can be overwritten despite the -n option is used.\n\ > "), stdout); >fputs (_("\ >--strip-trailing-slashes remove any trailing slashes from each > SOURCE\n\ Eep, Seems like we should use RENAME_NOREPLACE in this case, rather than document the caveat? This is already used in shred. cheers, Pádraig
bug#29961: [PATCH] mv: document the missing atomicity of 'mv -n'
* src/mv.c (usage): Add note about the missing atomicity of 'mv -n'. * doc/coreutils.texi (mv invocation): Likewise. --- doc/coreutils.texi | 3 +++ src/mv.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/doc/coreutils.texi b/doc/coreutils.texi index 3fa083085..e7ca6a737 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -9660,6 +9660,9 @@ If the response is not affirmative, the file is skipped. Do not overwrite an existing file. @mvOptsIfn This option is mutually exclusive with @option{-b} or @option{--backup} option. +Note that the operation is not atomic. If @var{dest} appears after +@command{mv} has checked its non-existence, it can be overwritten despite +the @option{-n} option is used. @item -u @itemx --update diff --git a/src/mv.c b/src/mv.c index a8df730a7..a08e75649 100644 --- a/src/mv.c +++ b/src/mv.c @@ -306,6 +306,8 @@ Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.\n\ -i, --interactiveprompt before overwrite\n\ -n, --no-clobber do not overwrite an existing file\n\ If you specify more than one of -i, -f, -n, only the final one takes effect.\n\ +NOTE: The operation is not atomic. If DEST appears after mv has checked its\n\ +non-existence, it can be overwritten despite the -n option is used.\n\ "), stdout); fputs (_("\ --strip-trailing-slashes remove any trailing slashes from each SOURCE\n\ -- 2.13.6
bug#29946: no -A argument for 'tr' generates an error message whenever the AIX command "lslpp -L" is used (AIX 6.1 and later).
On 03/01/18 04:16, Paul Eggert wrote: > +case 'A': > + /* Undocumented option, for compatibility with AIX. */ > + setlocale (LC_COLLATE, "C"); > + setlocale (LC_CTYPE, "C"); > + break; I'm ok with this as it's undocumented. Thanks for doing this. Pádraig
bug#29939: HELP:enter a "ls"command, then the os connection will closed
On 01/02/2018 07:25 AM, lil...@chinaunicom.cn 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
bug#29946: no -A argument for 'tr' generates an error message whenever the AIX command "lslpp -L" is used (AIX 6.1 and later).
On 1/3/2018 5:16 AM, Paul Eggert wrote: OK, attached is a proposed patch to coreutils. Michael, can you give it a try? Looks good! After patch: root@x072:[/home/prj/gnu/coreutils-8.29]lslpp -L | grep coreutils aixtools.gnu.coreutils.man.en_US 8.29.0.0 C F gnu coreutils man pages aixtools.gnu.coreutils.rte 8.29.0.0 C F gnu coreutils 03-Jan-2018 aixtools.gnu.coreutils.share 8.29.0.0 C F gnu coreutils universal files root@x072:[/home/prj/gnu/coreutils-8.29]