[Bug 1620139] Re: factor buffers output when run interactively
Pádraig Brady
P at draigBrady.com
Mon Sep 5 19:19:54 UTC 2016
Yes that operation was changed in 8.25 to ensure atomic output,
thus allowing one to run multiple factor processes in parallel
and collate the output.
I'll look at disabling this internal buffering if the output is line buffered
(which it will be if outputting to a terminal, or if stdbuf -oL is used)
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to coreutils in Ubuntu.
https://bugs.launchpad.net/bugs/1620139
Title:
factor buffers output when run interactively
Status in coreutils package in Ubuntu:
New
Bug description:
When the "factor" utility is run without any arguments, it reads
numbers from stdin and writes the factors to stdout. One use case for
this mode is to run factor in a terminal window and enter numbers
manually. This worked well in coreutils 8.23 and earlier. However,
in coreutils 8.25, the output of factor is buffered, making this mode
of operation less useful.
Notice that in the logs for version 8.25, all of the output occurs
after end-of-file has been reached on stdin.
I entered the following input:
factor --version
factor
5
7
9
^D
bash$ factor --version
factor (GNU coreutils) 8.23
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Paul Rubin, Torbjörn Granlund, and Niels Möller.
bash$ factor
5
5: 5
7
7: 7
9
9: 3 3
bash$
bash$ factor --version
factor (GNU coreutils) 8.25
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Paul Rubin, Torbjörn Granlund and Niels Möller.
bash$ factor
5
7
9
5: 5
7: 7
9: 3 3
bash$
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: coreutils 8.25-2ubuntu2
ProcVersionSignature: Ubuntu 4.4.0-36.55-generic 4.4.16
Uname: Linux 4.4.0-36-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
CurrentDesktop: KDE
Date: Sun Sep 4 23:32:33 2016
EcryptfsInUse: Yes
InstallationDate: Installed on 2013-08-13 (1118 days ago)
InstallationMedia: Ubuntu 12.04.2 LTS "Precise Pangolin" - Release amd64 (20130213)
SourcePackage: coreutils
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/1620139/+subscriptions
More information about the foundations-bugs
mailing list