Commit 694e7e2
committed
polycubectl: fix reading from standard input
After 074ece5 ("polycubectl: add reading from standard input capability")
polycubectl tries to read the standard input in all the invocations, this
causes commands typed by the user to hang up.
This commit uses a logic to detect if the standard input is being piped, in
that case it is used.
This bug was probably not detected for two reasons:
- We concentrate in test the new feature, i.e, loading configurations from files,
without testing the standard behaviour.
- The bug is not present in our CI (jenkins) probably because it executes
polycubect without stdin.
Fixes: 074ece5 ("polycubectl: add reading from standard input capability")
Reported-by: Gianluca Scopelliti <gianlu.1033@gmail.com>
Signed-off-by: Mauricio Vasquez B <mauriciovasquezbernal@gmail.com>1 parent ee9e8c5 commit 694e7e2
1 file changed
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
436 | 436 | | |
437 | 437 | | |
438 | 438 | | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
439 | 444 | | |
440 | 445 | | |
441 | 446 | | |
| |||
445 | 450 | | |
446 | 451 | | |
447 | 452 | | |
448 | | - | |
449 | | - | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
450 | 457 | | |
451 | 458 | | |
452 | 459 | | |
| |||
465 | 472 | | |
466 | 473 | | |
467 | 474 | | |
| 475 | + | |
| 476 | + | |
468 | 477 | | |
469 | 478 | | |
470 | 479 | | |
| |||
0 commit comments