exit with error if stdout isatty()

merge-requests/1/head
m. allan noah 2010-02-10 20:56:25 -05:00
rodzic aba1d85e0b
commit e4466b68cc
2 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -1,5 +1,6 @@
2010-02-10 m. allan noah <kitno455 at gmail dot com>
* acinclude.m4, configure: missing $ in variable expansion
* frontend/scanimage.c: exit with error if stdout isatty()
2010-02-10 m. allan noah <kitno455 at gmail dot com>
* backend/cardscan.[ch], backend/cardscan.conf.in,

Wyświetl plik

@ -2208,6 +2208,11 @@ List of available devices:", prog_name);
"Scanning %d pages, incrementing by %d, numbering from %d\n",
batch_count, batch_increment, batch_start_at);
else if(isatty(fileno(stdout))){
fprintf (stderr,"%s: output is not a file, exiting\n", prog_name);
exit (1);
}
do
{
char path[PATH_MAX];