[Top][All Lists]

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

bug#43497: ls exit status on removed directory

From: Philip Rowlands
Subject: bug#43497: ls exit status on removed directory
Date: Sat, 19 Sep 2020 00:15:33 +0100
User-agent: Cyrus-JMAP/3.3.0-325-g8593b62-fm-20200916.004-g0f995879-bis

Steps to reproduce:

$ mkdir /tmp/abc
$ cd /tmp/abc
$ rmdir /tmp/abc
$ ls

What happened:
no output, successful exit status

What was expected:
no output, unsuccessful exit status

ls tried to list the contents of . but failed to do so, at least on Linux:
getdents(3, 0x55e10c419cf0, 32768)      = -1 ENOENT (No such file or directory)

Although "stat ." and "ls -ld ." still work on the removed directory, should 
"ls ." report success even though the getdents syscall fails?

reply via email to

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