]> git.tuebingen.mpg.de Git - paraslash.git/commit
i9e: Restore file status flags on exit.
authorAndre Noll <maan@tuebingen.mpg.de>
Sat, 28 Jan 2017 18:33:26 +0000 (19:33 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Sat, 28 Jan 2017 20:29:13 +0000 (21:29 +0100)
commitd193847d4086ce3d3a08d741cb0d93ded9353976
treefe33d414963755b41be2fbf6ca82d45e65f0f13d
parentbc78a94412b17dfd445d6bb88f752041df3cf7ba
i9e: Restore file status flags on exit.

The i9e subsystem sets the stdin and stdout fds passed to i9e_open()
to nonblocking mode but misses to restore the original flags in
i9e_close(). This causes terminal applications like dialog to fail
if they are started in the same terminal after e.g. para_play was
executed.

This commit modifies i9e_open() to fetch and save the file status
flags before setting the O_NONBLOCK flag, and i9e_close() to restore
the original value. STDERR is not affected.
interactive.c