]> arthur.barton.de Git - bup.git/commit
Clean subprocess output without newliner
authorRob Browning <rlb@defaultvalue.org>
Sun, 26 Jun 2016 20:49:14 +0000 (15:49 -0500)
committerRob Browning <rlb@defaultvalue.org>
Mon, 15 Jan 2018 19:57:57 +0000 (13:57 -0600)
commit00fb1f1b2a53935ca7d5ce95ea4cf56b7f9bcc3d
tree584d44b7c0c953ea426acbb914594352b2f2b64b
parente4ada8c5f7ba1b8273fa8edcda226fe526647e7b
Clean subprocess output without newliner

Instead of launching a newliner subprocess from main.py to clean up the
output from other subprocesses (with respect to \r, shorter lines as
compared to the previous line, etc.), do something similar directly from
main.py via select, and then drop all of the attendant signal
forwarding, subprocess detaching via setsid(), etc. that the newliner
arrangement had accumulated.

Among other things, this should make bup much more responsive to
TERM/QUIT/etc. signals (i.e. C-c).  Previously the
index/save/... subprocess might continue running even after bup
appeared to have quit.

To clean up the output, regularly check tty_width() and always write
"whole" space-padded lines, tracking stdout and stderr independently
(bup-newliner redirected both to stdout).

Related:

  aa6f2c87e6f1292f1fa22f618532b65a5565d604
  b7a524ccb662c9ed3ebd786da0f45f459929ef45
  119f9dd3b3421c31578105954a34fc5e32826ae5
  073b383882e73904ae04179e69a68419d8d57199

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
Documentation/bup-newliner.md [deleted file]
cmd/newliner-cmd.py [deleted file]
lib/bup/helpers.py
main.py