check isatty() before querying so we don't loop endlessly

* gerror.c (g_on_error_query): check isatty() before querying so
we don't loop endlessly

-Yosh
This commit is contained in:
Manish Singh 1999-06-03 23:35:10 +00:00
parent 51bd87c02b
commit cd3dc1ccbd
12 changed files with 72 additions and 4 deletions

View File

@ -1,3 +1,8 @@
Thu Jun 3 16:30:31 PDT 1999 Manish Singh <yosh@gimp.org>
* gerror.c (g_on_error_query): check isatty() before querying so
we don't loop endlessly
Sat May 29 11:16:29 PDT 1999 Manish Singh <yosh@gimp.org>
* acinclude.m4

View File

@ -1,3 +1,8 @@
Thu Jun 3 16:30:31 PDT 1999 Manish Singh <yosh@gimp.org>
* gerror.c (g_on_error_query): check isatty() before querying so
we don't loop endlessly
Sat May 29 11:16:29 PDT 1999 Manish Singh <yosh@gimp.org>
* acinclude.m4

View File

@ -1,3 +1,8 @@
Thu Jun 3 16:30:31 PDT 1999 Manish Singh <yosh@gimp.org>
* gerror.c (g_on_error_query): check isatty() before querying so
we don't loop endlessly
Sat May 29 11:16:29 PDT 1999 Manish Singh <yosh@gimp.org>
* acinclude.m4

View File

@ -1,3 +1,8 @@
Thu Jun 3 16:30:31 PDT 1999 Manish Singh <yosh@gimp.org>
* gerror.c (g_on_error_query): check isatty() before querying so
we don't loop endlessly
Sat May 29 11:16:29 PDT 1999 Manish Singh <yosh@gimp.org>
* acinclude.m4

View File

@ -1,3 +1,8 @@
Thu Jun 3 16:30:31 PDT 1999 Manish Singh <yosh@gimp.org>
* gerror.c (g_on_error_query): check isatty() before querying so
we don't loop endlessly
Sat May 29 11:16:29 PDT 1999 Manish Singh <yosh@gimp.org>
* acinclude.m4

View File

@ -1,3 +1,8 @@
Thu Jun 3 16:30:31 PDT 1999 Manish Singh <yosh@gimp.org>
* gerror.c (g_on_error_query): check isatty() before querying so
we don't loop endlessly
Sat May 29 11:16:29 PDT 1999 Manish Singh <yosh@gimp.org>
* acinclude.m4

View File

@ -1,3 +1,8 @@
Thu Jun 3 16:30:31 PDT 1999 Manish Singh <yosh@gimp.org>
* gerror.c (g_on_error_query): check isatty() before querying so
we don't loop endlessly
Sat May 29 11:16:29 PDT 1999 Manish Singh <yosh@gimp.org>
* acinclude.m4

View File

@ -1,3 +1,8 @@
Thu Jun 3 16:30:31 PDT 1999 Manish Singh <yosh@gimp.org>
* gerror.c (g_on_error_query): check isatty() before querying so
we don't loop endlessly
Sat May 29 11:16:29 PDT 1999 Manish Singh <yosh@gimp.org>
* acinclude.m4

View File

@ -111,7 +111,14 @@ g_on_error_query (const gchar *prg_name)
query3);
fflush (stdout);
fgets (buf, 8, stdin);
#ifndef NATIVE_WIN32
if (isatty(0) && isatty(1))
fgets (buf, 8, stdin);
else
strcpy (buf, "E\n");
#else
fgets (buf, 8, stdin);
#endif
if ((buf[0] == 'E' || buf[0] == 'e')
&& buf[1] == '\n')

View File

@ -111,7 +111,14 @@ g_on_error_query (const gchar *prg_name)
query3);
fflush (stdout);
fgets (buf, 8, stdin);
#ifndef NATIVE_WIN32
if (isatty(0) && isatty(1))
fgets (buf, 8, stdin);
else
strcpy (buf, "E\n");
#else
fgets (buf, 8, stdin);
#endif
if ((buf[0] == 'E' || buf[0] == 'e')
&& buf[1] == '\n')

View File

@ -111,7 +111,14 @@ g_on_error_query (const gchar *prg_name)
query3);
fflush (stdout);
fgets (buf, 8, stdin);
#ifndef NATIVE_WIN32
if (isatty(0) && isatty(1))
fgets (buf, 8, stdin);
else
strcpy (buf, "E\n");
#else
fgets (buf, 8, stdin);
#endif
if ((buf[0] == 'E' || buf[0] == 'e')
&& buf[1] == '\n')

View File

@ -111,7 +111,14 @@ g_on_error_query (const gchar *prg_name)
query3);
fflush (stdout);
fgets (buf, 8, stdin);
#ifndef NATIVE_WIN32
if (isatty(0) && isatty(1))
fgets (buf, 8, stdin);
else
strcpy (buf, "E\n");
#else
fgets (buf, 8, stdin);
#endif
if ((buf[0] == 'E' || buf[0] == 'e')
&& buf[1] == '\n')