X-Git-Url: https://gapil.gnulinux.it/gitweb/?p=gapil.git;a=blobdiff_plain;f=sources%2FTCP_echod.c;h=3cc5ba30804a43fa09616701a420c9999e192d43;hp=606f85281c81117797816563483880e32814f43f;hb=be0b7b2add1b886196ad5e0847657f85025adfbf;hpb=d12bc3e1e4b3ee762036d1c226c3b2ba1a720fb9 diff --git a/sources/TCP_echod.c b/sources/TCP_echod.c index 606f852..3cc5ba3 100644 --- a/sources/TCP_echod.c +++ b/sources/TCP_echod.c @@ -1,6 +1,6 @@ -/* ElemEchoTCPServer.c +/* TCP_echod.c * - * Copyright (C) 2001 Simone Piccardi + * Copyright (C) 2001-2003 Simone Piccardi * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,7 +26,7 @@ * * Usage: echod -h give all info * - * $Id: TCP_echod.c,v 1.1 2003/05/02 09:50:55 piccardi Exp $ + * $Id: TCP_echod.c,v 1.3 2003/05/12 22:52:29 piccardi Exp $ * ****************************************************************/ /* @@ -136,7 +136,9 @@ int main(int argc, char *argv[]) /* handle echo to client */ while (1) { /* accept connection */ - if ( (conn_fd = accept(list_fd, NULL, NULL)) < 0) { + while (((conn_fd = accept(list_fd, NULL, NULL)) < 0) + && (errno == EINTR)); + if ( conn_fd < 0) { PrintErr("accept error"); exit(1); }