[xdebug-general] Re: Socket Connection When XDEBUG_SESSION_STOP issued

From: Dave Kelsey <d_kelsey[@]uk.ibm.com>
Date: Fri, 3 Nov 2006 11:54:24 +0000

Derick Rethans <derick[@]xdebug.org> wrote on 03/11/2006 07:56:36:

> On Wed, 1 Nov 2006, Dave Kelsey wrote:
>
> > Hi Derick, I know that I raised the issue before and you changed it,
but I
> > have thought of a reason why a debug client might want a socket
connection
> > when a XDEBUG_SESSION_STOP is issued. In the scenario with a multi
request
> > script, a debug client may sit and wait listening for another socket to
> > created when the user interacts with the script (to debug the next
> > request). However they may wish to terminate the debug session. The
debug
> > client issues XDEBUG_SESSION_STOP on one thread, but another thread is
> > blocked listening on the port. That thread gets unblocked when the
socket
> > is established. It knows it is terminating so can close the socket and
the
> > debug client can terminate.
>
> I don't quite see how that can happen. Xdebug will make a connection for
> *every* request (not just once in a multi-request script) so I don't see
> how you can have a blocking socket. Perhaps you have a blocking accept()
> though but that shouldn't be a problem as that shouldn't block any other
> communications.
>
Sorry I meant to be more specific, my debug client thread is blocked
waiting for
a socket to connect to my listener thread (ie the one doing the accept)
which
has the correct IDEKEY value (the session id). If a stop initiates a socket
connection then this
can be used to unblock my waiting thread and allow the debug client to
terminate.

When RC2 comes out (or the next version) I can change my code to work
differently
in order to handle the fact that no socket connection is made. But I wonder
what
other debug clients currently do and whether this will have an impact on
them ?

> > Would it be possible to support the option to define whether a socket
is
> > established or not on a XDEBUG_SESSION_STOP through the feature
facilities
> > of XDebug. This would allow for clients coded to the current behaviour
of
> > XDebug to continue without change ?
>
> I don't want to create an option for this, as Xdebug has too many
> options already in my opinion.
>
> regards,
> Derick
>
> --
> Xdebug | http://xdebug.org | xdebug-general@lists.xdebug.org

Sure, I understand.

Regards
Dave
Received on Fri Nov 03 2006 - 12:51:50 GMT

This archive was generated by hypermail 2.2.0 : Mon Jun 25 2018 - 06:00:04 BST