Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multiple windows / Multiple programs
#2
Why are you execing new processes inside of a thread? If you want a new process you should just call [url="http://msdn2.microsoft.com/en-us/library/ms682425.aspx"]CreateProcess[/url] under Windows or fork/exec under Unix (check the man pages). You generally don't want/need to exec a new process from a thread unless the thread is also doing some other work.

I'm not sure how the screen mode thing works in FB. But typically when you fork a new process (I don't know the details of how Windows behaves for this) it makes an exact clone of the parent process. Possibly this is overriding the gfx flag somehow?

However, if you are trying to communicate between between each of the programs I would suggest just using threads. Communication between processes is usually a pain. You can use shared text files or memory maps (which is tacky and error prone), or something more complicated like pipes or sockets. With threads you have access to the same heap and using mutexes (see pthread_mutex_lock/unlock under Unix) you can do inter-thread communicate without race conditions fairly easily.
esus saves.... Passes to Moses, shoots, he scores!
Reply


Messages In This Thread
Multiple windows / Multiple programs - by wallace - 01-27-2007, 10:27 PM
Multiple windows / Multiple programs - by LooseCaboose - 01-28-2007, 09:23 AM
Multiple windows / Multiple programs - by wallace - 01-28-2007, 11:36 PM
Multiple windows / Multiple programs - by wallace - 01-29-2007, 10:42 PM
Multiple windows / Multiple programs - by Anonymous - 02-15-2007, 11:24 PM
Multiple windows / Multiple programs - by D.slert - 08-27-2009, 03:58 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)