Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!bcm!etaylor From: etaylor@wilkins.iaims.bcm.tmc.edu (Eric Taylor) Newsgroups: comp.windows.x Subject: Re: Allocating Colors in a forked process Message-ID: <3436@gazette.bcm.tmc.edu> Date: 3 Jan 91 16:35:42 GMT References: <53361@eerie.acsu.Buffalo.EDU> Sender: usenet@bcm.tmc.edu Reply-To: etaylor@wilkins.iaims.bcm.tmc.edu (Eric Taylor) Organization: Baylor College of Medicine, Houston, Tx Lines: 25 Nntp-Posting-Host: wilkins.iaims.bcm.tmc.edu In article <53361@eerie.acsu.Buffalo.EDU>, prussak@acsu.buffalo.edu (michal prussak) writes: |> |> There is another problem for all you Xperts. In my Xtoolkit |> program I have a callback function. This function forks in |> the middle, where the parent returns, while the child keeps |> on doing some work. The child calls XAllocColor at some point, |> but XAllocColor never returns. Can anybody care to explain |> why could XAllocColor choose to hang? Is there any way around it? |> |> Michal Prussak When you fork, you must close the connection to X in your child process, then reopen it. Then, to the X server, you are two completely different clients free to do whatever you desire. I am not sure of the supposed behavior of a connection after a process forks, but I assume it is undefined because of different implementations (i.e. VAX) -- Eric Taylor Baylor College of Medicine etaylor@wilkins.bcm.tmc.edu (713) 798-3776