Whether or not the width/length should be automatic should depend only on whether the
output is a terminal, and not upon the existance of SIGWINCH
a->file = fn_open (a->file_name, a->append ? "a" : "w");
if (a->file != NULL)
{
-#if HAVE_DECL_SIGWINCH
if ( isatty (fileno (a->file)))
{
+#if HAVE_DECL_SIGWINCH
struct sigaction action;
sigemptyset (&action.sa_mask);
action.sa_flags = 0;
action.sa_handler = winch_handler;
the_driver = a;
+ sigaction (SIGWINCH, &action, NULL);
+#endif
a->auto_width = true;
a->auto_length = true;
- sigaction (SIGWINCH, &action, NULL);
}
-#endif
}
else
{