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 » Developing U++ » U++ Developers corner » TheIDE zombie problem
Re: TheIDE zombie problem [message #7456 is a reply to message #7454] Sat, 30 December 2006 11:56 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14255
Registered: November 2005
Ultimate Member
lundman wrote on Sat, 30 December 2006 05:04

Well, you can start children you don't need to wait on, if you really do not need to know when they die. Just start a new process group (setsid()) before calling.

if (!fork()) {
  // as child
  close(fileno(STDIN));
  close(fileno(STDOUT));
  close(fileno(STDERR));
  setsid();
  execve(argv[0], argv, env);
  /* not reached */
}


Iwould assume that's fine for "execute", but if you want to run it in debugged, you may need/want the SIGCHLD to know when it dies? Or if you are using stdin/out, deal/ignore SIGPIPE.

I can certainly fix it, so it leaves no zombies, if that is all that is needed.



Well I am afraid that above solution is not correct - you have to wait for pid returned from fork in the parent process.

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Twain - support for scanners - needed
Next Topic: Extensions of X-Server
Goto Forum:
  


Current Time: Mon Apr 28 13:29:18 CEST 2025

Total time taken to generate the page: 0.01113 seconds