From 9624d9d4dff849a0477be936439bd524f4598914 Mon Sep 17 00:00:00 2001 From: Ali Gholami Rudi Date: Tue, 29 Sep 2009 21:38:27 +0330 Subject: [PATCH] draw: close framebuffer fd after exec --- draw.c | 1 + 1 file changed, 1 insertion(+) diff --git a/draw.c b/draw.c index c2d7b62..3666fa3 100644 --- a/draw.c +++ b/draw.c @@ -102,6 +102,7 @@ void fb_init(void) xerror("ioctl failed"); if ((vinfo.bits_per_pixel + 7) >> 3 != BPP) xdie("fbval_t does not match framebuffer depth"); + fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC); init_colors(); fb = mmap(NULL, fb_len(), PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); if (fb == MAP_FAILED) -- 2.11.4.GIT