Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Feb 2001 21:32:42 +0100
From:      Thierry Herbelot <thierry.herbelot@free.fr>
To:        hackers@freebsd.org
Subject:   detecting a closing socket from a Lex/Yacc interpreter ?
Message-ID:  <3A95776A.1E76A7B@free.fr>

next in thread | raw e-mail | index | archive | help
Hello,

I'm currently writing a small interpreter for a client/server
application.

the Lex and Yacc files seem to be OK, as the tests are running fine (as
long as there is only one client, and the client dos not close its
socket ...)

I still have one problem : the server has a single thread : the process
accept()s a connection, then processes the commands (with yyparse()),
and after the current client disconnects, gets back to listening to the
socket, and so on.

the problem is that the yyparse() function does not return when the
socket is closed. I've had a look at the sources of ftpd, where yacc is
used, but from what I've seen, the yylex() function has been hand
written (which I would like not to do)

I've added a <<EOF>> target in the lex file, but it does not seem to
detect the socket close()

	taker for any solution,

	TfH
-- 
Thierry Herbelot

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A95776A.1E76A7B>