Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » Segfaults with One container?
Re: Segfaults with One container? [message #23180 is a reply to message #23177] Thu, 24 September 2009 09:43 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13980
Registered: November 2005
Ultimate Member
phirox wrote on Wed, 23 September 2009 03:22

Thank you for your fast response, and as always it was right on. I think I have stared to long at the problem to notice it myself Smile

For future references the solution for me was to add the following code:

	s.Init();
	One<Socket::Data> data = new Socket::Data;
	s.Attach(data);


The reason for all of this; under *nix when you fork() or reload your own or other program with exec() all sockets are inherited. So for example by just adding
data->socket = 3;
in the above example you can continue working on it without interruption. Maybe an idea to add this feature as a function OldSocket/OpenedSocket besides the existing ClientSocket and ServerSocket?


I am not quite happy about this; I think Socket::Data should in fact be private. I guess Socket::Attach(SOCKET) would solve the problem, right?
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Dockmenu Draw
Next Topic: How to set a global (system) keyboard hook?
Goto Forum:
  


Current Time: Tue May 14 02:31:54 CEST 2024

Total time taken to generate the page: 0.02727 seconds