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) » fork() problem
Re: fork() problem [message #18951 is a reply to message #18936] Sun, 02 November 2008 15:07 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14263
Registered: November 2005
Ultimate Member
mdelfede wrote on Sat, 01 November 2008 15:29

This (very simple) gui app :

GUI_APP_MAIN
{	

	int pid;
	pid = fork();
	if(pid > 0)
	{
		PromptOK("Process " + AsString(pid));
		return;

	}
	else if (pid == 0)
	{
		PromptOK("Parent Process");
		return;
	}
	else
	{
		PromptOK("ERROR");
		return;
	}

	TestFork().Run();
}


Crashes (with memory leak msgbox) instead of forking into 2 processes.

Max




Eh, I wish I knew all details that can go bad when forking GUI process. Anyway, for starters, there is socket open to communicate with X11 server - wonder what happens to that Smile

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: SelfUpdate()
Next Topic: Huge font in upp[Gnome-Debian]
Goto Forum:
  


Current Time: Sun Jun 29 20:17:52 CEST 2025

Total time taken to generate the page: 0.04019 seconds