Ctrl-C doesn't work in application using OGL (eglGetPlatformDisplay overrides signal handler)

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Ctrl-C doesn't work in application using OGL (eglGetPlatformDisplay overrides signal handler)

跳至解决方案
539 次查看
tamo2
Contributor II

Hi,

We have an application using OpenGL.  The application sets up a signal handler for a few signals including SIGINT.  We noticed that Ctrl-C signal handler wasn't working in the application and we tracked it down and it was a call to an OGL function:

  egl_disp = eglGetPlatformDisplay(EGL_PLATFORM_GBM_KHR, (EGLNativeDisplayType)gbmDevice, NULL);

Seems like eglGetPlatformDisplay overrides the signal handler function.  By resetting the signal handler to our own, Ctrl-C seems to work, but I am wondering if there is any bad side effect of doing that.

The application runs on an imx8mp based SOM from Compulab, Yocto hardknott.

The same applications runs fine without any modification on a Snapdragon based system (same source code, built for Snapdragon using MESA). 

标签 (1)
标记 (4)
0 项奖励
1 解答
527 次查看
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @tamo2 

As it overrides user space signal, this won't have bad effect for egl driver.

 

在原帖中查看解决方案

2 回复数
528 次查看
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @tamo2 

As it overrides user space signal, this won't have bad effect for egl driver.

 

516 次查看
tamo2
Contributor II

Do you have any idea why eglGetPlatformDisplay() replaces the siganal handler?

0 项奖励