X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Feventl.c;h=be79cf3e006e68cb248c7db7d05f8a253c4f30d2;hp=b5ef1234a21bacfd5d19c5550b95812e009041ef;hb=3d6e2f0931ae87fe01e857d4573d946f6cd8e6f1;hpb=08a57d6b7c0d759bf293fbad03d03363f1cb7bc5 diff --git a/src/eventl.c b/src/eventl.c index b5ef123..be79cf3 100644 --- a/src/eventl.c +++ b/src/eventl.c @@ -1,8 +1,7 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2010 Index Data + * Copyright (C) Index Data * See the file LICENSE for details. */ - /** * \file eventl.c * \brief Implements event loop handling for GFS. @@ -10,6 +9,9 @@ * This source implements the main event loop for the Generic Frontend * Server. */ +#if HAVE_CONFIG_H +#include +#endif #include #include @@ -76,7 +78,7 @@ int iochan_is_alive(IOCHAN chan) return 1; } -int iochan_event_loop(IOCHAN *iochans) +int iochan_event_loop(IOCHAN *iochans, int *watch_sig) { do /* loop as long as there are active associations to process */ { @@ -125,6 +127,8 @@ int iochan_event_loop(IOCHAN *iochans) if (yaz_errno() == EINTR) { xfree(fds); + if (watch_sig && *watch_sig) + break; continue; } else