Bug#27471: marked as done (internal Debugger and SIGPIPE) by John Firebaugh <jfirebaugh at kde.org>

Stephan Kulow owner at bugs.kde.org
Sat Aug 31 07:51:20 UTC 2002


Your message with subj: internal Debugger and SIGPIPE

Thank you for your bug report.
The bug that your reported no longer applies to the latest development (CVS) 
version of KDE. This is most probably because the bug has been fixed, the 
application has been substantially modified, or the application no longer 
exists. The bug report will be closed.

has caused the attached bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I'm
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Stephan Kulow
(administrator, KDE bugs database)

(Complete bug history is available at http://bugs.kde.org/db/27/27471.html)

Received: (at submit) by bugs.kde.org; 20 Jun 2001 05:13:12 +0000
Received: (qmail 9809 invoked by uid 33); 20 Jun 2001 05:13:11 -0000
Date: 20 Jun 2001 05:13:11 -0000
Message-ID: <20010620051311.9808.qmail at master.kde.org>
To: submit at bugs.kde.org
Subject: internal Debugger and SIGPIPE
From: oliver.kowalke at t-online.de

Package:           kdevelop
Version:           Kdevelop 1.4 (using KDE 2.1.1 )
Severity:          normal
Installed from:    Compiled From Sources
Compiler:          gcc-2.95.2
OS:                Linux
OS/Compiler notes: Not Specified

Hi,

If I debugg my code with the internal debugger of KDevelop. The current cursor disapears after second write to a closed socket. In this case SIGPIPE is thrown. I set the signals mask of this process to ignore SIGPIPE ( ::sigaction() ) so I should retrieve EPIPE as errno after second write to the closed socket.
The code is OK. I put some 'std::cout << "blah blah" << std::endl;' in the error detection. After compiling and executing(no debugging) it I can follow the execution path.
If I debugg this code I can't follow the execution path.

with best regards,
Oliver

code:

ssize_t
stream_sock::writen( const void * vptr, size_t n)
{
	size_t		nleft;
	ssize_t		nwritten;
	const char	*ptr;

	ptr = static_cast< const char * >( vptr);
	nleft = n;

	struct sigaction new_sa;
	struct sigaction old_sa;
	
	new_sa.sa_handler = SIG_IGN;
	::sigemptyset( & new_sa.sa_mask);
	new_sa.sa_flags = 0;
	::sigaction( SIGPIPE, & new_sa, & old_sa);		

	while ( nleft > 0)
	{
		if ( ( nwritten = ::write( m_handle, ptr, nleft) ) <= 0)
		{
			if ( errno == EINTR)
				nwritten = 0;		/* and call write() again */
			else if ( errno == EPIPE)
			{
				::sigaction( SIGPIPE, & old_sa, 0);
				return EOF;			/* write to socket with no readers (peer has the socket closed) */
			}
			else
			{
				::sigaction( SIGPIPE, & old_sa, 0);
				throw net_io_ex( ::strerror( errno), "writen()", __FILE__);			/* error */
			}
		}

		nleft -= nwritten;
		ptr   += nwritten;
	}
	/* set to its previous action */
	::sigaction( SIGPIPE, & old_sa, 0);

	return n;
}

(Submitted via bugs.kde.org)





More information about the KDevelop-devel mailing list