mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Ubuntu 'select' Fix
- Added a delay before the 'select' call on STDIN, to allow time for the data to buffer. Experimental patch.
This commit is contained in:
parent
773b028865
commit
5f13019d05
1 changed files with 3 additions and 0 deletions
|
@ -279,6 +279,9 @@ bool A3::is_command (
|
|||
// Add an Arg for every word from std::cin.
|
||||
void A3::append_stdin ()
|
||||
{
|
||||
// Delay, to give it a chance to buffer the input.
|
||||
delay (0.01);
|
||||
|
||||
// Use 'select' to determine whether there is any std::cin content buffered
|
||||
// before trying to read it, to prevent blocking.
|
||||
struct timeval tv;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue