sw/xlib: Fallback to XPutImage when shmget fails.

After continuously running regression tests on Ubuntu for 2 days, shmget
mysteriously starts to fail. Even when the X server is reset.

This allow rendering to proceed, albeit using a slower presentation path.
This commit is contained in:
José Fonseca 2010-04-23 16:56:55 +01:00
parent 158f9d56e0
commit 405f925d4e
1 changed files with 5 additions and 6 deletions

View File

@ -385,13 +385,12 @@ xm_displaytarget_create(struct sw_winsys *winsys,
if (!debug_get_bool_option("XLIB_NO_SHM", FALSE))
{
xm_dt->shminfo.shmid = -1;
xm_dt->shminfo.shmaddr = (char *) -1;
xm_dt->shm = TRUE;
xm_dt->data = alloc_shm(xm_dt, size);
if(!xm_dt->data)
goto no_data;
if(!xm_dt->data) {
xm_dt->shminfo.shmid = -1;
xm_dt->shminfo.shmaddr = (char *) -1;
xm_dt->shm = TRUE;
}
}
if(!xm_dt->data) {