Make sure that the pager terminates before the process that feeds it.
commit16ea9c7aa337b1acb7c1041b4730a4b168096706
authorJohannes Sixt <johannes.sixt@telecom.at>
Thu, 18 Jan 2007 13:18:11 +0000 (18 14:18 +0100)
committerJohannes Sixt <johannes.sixt@telecom.at>
Fri, 19 Jan 2007 15:35:32 +0000 (19 16:35 +0100)
treed266428caf577f17766371807021d53ca6a68154
parent85e94b981ef0df32c3e5170499298369513bf864
Make sure that the pager terminates before the process that feeds it.

Since the pager was spawned as child process, it does not notice when
the parent (which feeds its stdin) terminates. If the pager is 'less'
it so looses control over the terminal and cannot be controled by
the user anymore. For this reason, we register a function atexit()
that explicitly waits for the pager to terminate.
pager.c