mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 16:57:00 +08:00
do not start pager when not on a tty.
This commit is contained in:
@@ -114,7 +114,7 @@ AC_CHECK_MEMBER([struct sockaddr.sa_len],
|
||||
|
||||
AC_CHECK_HEADERS([net/if_tun.h linux/if_tun.h netinet/in_systm.h], [], [], [])
|
||||
|
||||
AC_CHECK_FUNCS([setproctitle clock_gettime])
|
||||
AC_CHECK_FUNCS([setproctitle clock_gettime isatty])
|
||||
|
||||
if [ test -z "$LIBWRAP" ];then
|
||||
libwrap_enabled="no"
|
||||
|
||||
@@ -45,6 +45,11 @@ FILE* pager_start(void)
|
||||
{
|
||||
FILE *fp;
|
||||
|
||||
#ifdef HAVE_ISATTY
|
||||
if (isatty(STDOUT_FILENO) == 0)
|
||||
return stdout;
|
||||
#endif
|
||||
|
||||
if (!getenv("LESS")) {
|
||||
setenv("LESS", "FRSX", 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user