LibGUI: Open the GUI event stream with O_CLOEXEC.

This commit is contained in:
Andreas Kling 2019-01-21 01:33:16 +01:00
parent d66b0f7dd8
commit 6d9959e367
Notes: sideshowbarker 2024-07-19 15:59:40 +09:00

View file

@ -36,7 +36,7 @@ GEventLoop& GEventLoop::main()
int GEventLoop::exec()
{
m_event_fd = open("/dev/gui_events", O_RDONLY | O_NONBLOCK);
m_event_fd = open("/dev/gui_events", O_RDONLY | O_NONBLOCK | O_CLOEXEC);
if (m_event_fd < 0) {
perror("GEventLoop::exec(): open");
exit(1);