hush: fix a case when redirect to a closed fd #1 is not restoring (closing) it
authorDenys Vlasenko <vda.linux@googlemail.com>
Mon, 24 Jul 2017 10:42:17 +0000 (12:42 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Mon, 24 Jul 2017 10:42:17 +0000 (12:42 +0200)
commit621fc50e83f7446a060f0b9689dc8dc59ee0743a
tree7b40c2368fe3f7387ab44a1f0758d850cbd29929
parentb72f1ef17b97802d33f0ac522f64bea0f65442c5
hush: fix a case when redirect to a closed fd #1 is not restoring (closing) it

function                                             old     new   delta
setup_redirects                                      200     245     +45
append_squirrel                                        -      41     +41
save_fds_on_redirect                                 256     221     -35
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/1 up/down: 86/-35)             Total: 51 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/hush.c
shell/hush_test/hush-redir/redir.right [new file with mode: 0644]
shell/hush_test/hush-redir/redir.tests [new file with mode: 0755]