2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

handle eof

This commit is contained in:
Mark Andrews
2006-12-04 05:53:49 +00:00
parent ea661eaf4e
commit a7449c24fb

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: gsstest.c,v 1.2 2006/12/04 01:52:45 marka Exp $ */
/* $Id: gsstest.c,v 1.3 2006/12/04 05:53:49 marka Exp $ */
#include <config.h>
@@ -409,12 +409,13 @@ static void
setup(void)
{
struct in_addr inaddr;
int c;
while (1) {
printf("Server IP => ");
scanf("%s", serveraddress);
c = scanf("%s", serveraddress);
if(strcmp(serveraddress, "quit") == 0) {
if(c == EOF || strcmp(serveraddress, "quit") == 0) {
isc_app_shutdown();
return;
}