Simultaneous uses of fprintf() in several threads.

Le Coent Yannick Yannick.LeCoent at srit.siemens.fr
Fri Nov 10 17:51:08 GMT 2000


Hello,

I have got a problem when using the KDevelop debugger.

This is the source I used.

 <<main.c>> 

This is what the code does:
	1. The main() function displays "1:Main begin\n" to stdout
	2. Then it creates thread#1 which does some fprintf() too.
	3. Then Thread#1 creates thread#2 which also uses fprintf().
	4. When Thread#2 has ended, Thread#1 does again some fprintf()
	5. Adn when Thread#1 has ended, main() uses again fprintf().

When the application is launched without the debugger, I have got:
	1:Main begin
	2:Entering thread #1!
	3:Waiting for end of thread #2!
	4:Entering thread #2!
	5:Leaving thread #2!
	6:Leaving thread #1!
	7:Main end

When the application is launched by the KDevelop debugger, I have got:
	1:Main begin
	2:Entering thread #1!
	4:Entering thread #2!
	5:Leaving thread #2!

I do not know why I do not get the lines "6:" and "7:".

Thanks for any help,
Yannick LE COENT
SIEMENS Réseaux Informatiques et Télécommunications
3, rue Blaise Pascal
F - 22300 LANNION

Tel.:	+33-2-96 48 74 26
Fax:	+33-2-96 48 74 73
E-mail:	Yannick.LeCoent at srit.siemens.fr


-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.c
Type: application/octet-stream
Size: 2755 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop/attachments/20001110/d02861be/attachment.obj>


More information about the KDevelop mailing list