The pager_redirect function was only used in dmesg. Since it is no
longer used there, drop it from lib/pager.c as well.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
sigaction(SIGPIPE, &sa, &pager_process.orig_sigpipe);
}
-/* Setup pager and redirect output to the $PAGER. The pager is closed at exit.
- */
-void pager_redirect(void)
-{
- if (pager_process.pid)
- return; /* already running */
-
- pager_open();
-
- atexit(pager_close);
-}
-
/* Setup pager and redirect output, the pager may be closed by pager_close().
*/
void pager_open(void)
{
int i;
- pager_redirect();
+ pager_open();
for (i = 0; i < MAX; i++)
printf("%d\n", i);
+ pager_close();
return EXIT_SUCCESS;
}
#endif /* TEST_PROGRAM_PAGER */