Andrea Cardaci 8eaf595fe6 Make interactive execute whenever possible
Here the trick is to restore those file descriptors (0, 1, 2) that have been
redirected (`dup2`) by the parent process.

First we need to determine which one has been redirected, for example by looking
at `ls -l /proc/$$/fd/`. Then we can use `0<&x`, `1>&x` or `2>&x` to restore 0,
1 or 2 respectively, where `x` is any file descriptor number that points to the
TTY.

It may happen that no file descriptor is unchanged, in that case we can use
`tty` to perform the redirection: sh <$(tty) >$(tty) 2>$(tty)
2018-09-07 01:11:06 +02:00
..
2018-08-31 11:09:19 +02:00
2018-07-16 15:01:50 +02:00
2018-09-06 19:18:22 +02:00
2018-07-16 15:01:50 +02:00
2018-08-24 11:33:15 +02:00
2018-07-16 15:01:50 +02:00
2018-07-16 15:01:50 +02:00
2018-09-06 17:08:01 +02:00
2018-07-16 15:01:50 +02:00
2018-08-19 11:14:16 +01:00
2018-07-16 15:01:50 +02:00
2018-07-16 15:01:50 +02:00
2018-07-16 15:01:50 +02:00
2018-09-04 13:42:37 +02:00
2018-07-16 15:01:50 +02:00
2018-07-16 15:01:50 +02:00
2018-07-16 15:01:50 +02:00
2018-07-16 15:01:50 +02:00
2018-07-16 15:01:50 +02:00
2018-09-06 19:18:22 +02:00
2018-07-16 15:01:50 +02:00
2018-07-16 15:01:50 +02:00
2018-07-16 15:01:50 +02:00
2018-09-06 19:18:22 +02:00
2018-08-24 13:30:23 +02:00
2018-07-16 15:01:50 +02:00
2018-07-16 15:01:50 +02:00
2018-07-16 15:01:50 +02:00
2018-08-24 12:08:37 +02:00
2018-07-16 15:01:50 +02:00
2018-08-31 11:09:19 +02:00
2018-07-22 15:42:43 +01:00
2018-08-24 11:33:15 +02:00
2018-07-16 15:01:50 +02:00
2018-08-23 23:45:07 +01:00
2018-07-16 15:01:50 +02:00
2018-07-16 15:01:50 +02:00
2018-07-16 15:01:50 +02:00
2018-08-24 13:30:23 +02:00
2018-07-16 15:01:50 +02:00
2018-09-06 19:18:12 +02:00
2018-08-31 10:17:36 +02:00
2018-07-16 15:01:50 +02:00
2018-07-16 15:01:50 +02:00
2018-07-16 15:01:50 +02:00
2018-07-16 15:01:50 +02:00
2018-08-31 15:51:14 +02:00
2018-07-16 15:01:50 +02:00
2018-07-16 15:01:50 +02:00
2018-07-16 15:01:50 +02:00
2018-07-16 15:01:50 +02:00
2018-07-16 15:01:50 +02:00
2018-07-16 15:01:50 +02:00
2018-09-07 00:29:58 +02:00
2018-07-16 15:01:50 +02:00
2018-07-16 15:01:50 +02:00
2018-07-16 15:01:50 +02:00
2018-07-16 15:01:50 +02:00
2018-07-16 15:01:50 +02:00
2018-07-16 15:01:50 +02:00
2018-07-16 15:01:50 +02:00
2018-07-16 15:01:50 +02:00
2018-08-19 11:32:48 +01:00
2018-07-16 15:01:50 +02:00