diff options
-rw-r--r-- | pw.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -840,7 +840,8 @@ int main(int argc, char **argv) if (!ferror(stdin)) exit_status = 0; if (auto_quit) { - clrline(); + if ((stat & stat_bkgnd) == 0) + clrline(); break; } } @@ -1348,7 +1349,11 @@ int main(int argc, char **argv) } } } - clrline(); - ttyset(ttyfd, &tty_saved); + + if ((stat & stat_bkgnd) == 0) { + clrline(); + ttyset(ttyfd, &tty_saved); + } + return exit_status; } |