emacs-bug-tracker
[Top][All Lists]
Advanced

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

bug#70477: closed (tail command does not hang on /dev/random)


From: GNU bug Tracking System
Subject: bug#70477: closed (tail command does not hang on /dev/random)
Date: Sat, 20 Apr 2024 04:53:02 +0000

Your message dated Fri, 19 Apr 2024 21:52:20 -0700
with message-id <cd5e3958-dcd3-4928-a5d4-7e57825228f9@cs.ucla.edu>
and subject line Re: bug#70477: tail command does not hang on /dev/random
has caused the debbugs.gnu.org bug report #70477,
regarding tail command does not hang on /dev/random
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
70477: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=70477
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: tail command does not hang on /dev/random Date: Fri, 19 Apr 2024 21:40:35 +0300
The following command hangs indefinitely, as expected:

        tail -c 4096 /dev/random

The following command immediately returns 4097 bytes, unexpectedly:

        tail -c 4097 /dev/random

Details:
- Source code obtained from: git://git.sv.gnu.org/coreutils
- Commit id: 9ab1f9db94479eca4dd2c29b4e21550ff2bcd5bb
- System:

        $ uname -a
        Linux zinc 6.1.0-20-amd64 #1 SMP PREEMPT_DYNAMIC Debian
6.1.85-1 (2024-04-11) x86_64 GNU/Linux



--- End Message ---
--- Begin Message --- Subject: Re: bug#70477: tail command does not hang on /dev/random Date: Fri, 19 Apr 2024 21:52:20 -0700 User-agent: Mozilla Thunderbird
On 2024-04-19 11:40, Ionut Nicula wrote:
The following command hangs indefinitely, as expected:

         tail -c 4096 /dev/random

The following command immediately returns 4097 bytes, unexpectedly:

         tail -c 4097 /dev/random

Thanks for the bug report. Although the two commands should behave similarly, neither should loop: they should both output the requested number of random bytes. Similarly for /dev/zero. I installed the attached patch to do that.

Attachment: 0001-tail-avoid-infloop-with-c-on-dev-zero.patch
Description: Text Data


--- End Message ---

reply via email to

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