Home » U++ Library support » U++ Library : Other (not classified elsewhere) » fork() problem
Re: fork() problem [message #18956 is a reply to message #18955] |
Sun, 02 November 2008 16:34   |
 |
mirek
Messages: 14263 Registered: November 2005
|
Ultimate Member |
|
|
mdelfede wrote on Sun, 02 November 2008 09:52 |
luzr wrote on Sun, 02 November 2008 15:07 |
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 
Mirek
|
Well, I would have been happy to fork and close the parent (that was what I needed...) but doesn't work either.
I guess the fork() must be done BEFORE the gui initialization.
The strange stuff is that SysExec() package USES the fork() and it works....
Max
|
Ehm, now this one is correct and I am wrong.
In fact, theide itself forks in SlaveProcess quite frequently.
Mirek
|
|
|
Goto Forum:
Current Time: Sun Jun 29 15:04:39 CEST 2025
Total time taken to generate the page: 0.02750 seconds
|