why not allow another process access to share memory of xvfb?
xing5820 at gmail.com
Thu Jun 10 22:54:12 PDT 2010
thank you you all! now i understand the reason and solution.
2010/6/10 Daniel Stone <daniel at fooishbar.org>
> On Thu, Jun 10, 2010 at 03:10:52PM +0800, xin zhang wrote:
> > Hi experts:
> > In Xvfb implementation, the frame buffer is allocated with IPC_PRIVATE
> > if uses SHM.
> > Given that IPC_PRIVATE is just useful to parent/child process, and given
> > X is a single process,
> > I don't realize what is the use.
> > Why not add a param which allows user pass a string to produce IPC key,
> > and create share memory
> > with the key, then other process will really access to the frame buffer.
> > I think this will benefit many softwares, e.g. VNC, there is no need to
> > write an individual X server, just
> > do an extension hooks on Xvfb is OK.
> > Does anyone know the reason? is it for security? thank you.
> Because direct access to the framebuffer might get you anything,
> including corruption if you access it in the middle of a copy. If you
> want to get the framebuffer contents through SHM, use XShmGetImage().
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> -----END PGP SIGNATURE-----
More information about the xorg-devel