Bug 238677 - devel/efl: Leaks event monitor fds into child processes
Summary: devel/efl: Leaks event monitor fds into child processes
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-enlightenment mailing list
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2019-06-18 02:36 UTC by Conrad Meyer
Modified: 2019-06-18 02:36 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (enlightenment)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Conrad Meyer freebsd_committer 2019-06-18 02:36:24 UTC
Please see the full report text in this upstream issue: https://phab.enlightenment.org/T7486

The fix is trivial -- add O_CLOEXEC to an open.  I thought upstream might fix it, but it does not appear they will.  So we might consider patching it in ports.

The patch to fix is totally trivial:

--- ./eio_monitor_kevent.c.orig 2019-06-17 19:34:47.015700000 -0700
+++ ./eio_monitor_kevent.c      2019-06-17 19:35:04.938381000 -0700
@@ -271,7 +271,7 @@
    res = stat(monitor->path, &st);
    if (res) goto error;

-   fd = open(monitor->path, O_RDONLY);
+   fd = open(monitor->path, O_RDONLY | O_CLOEXEC);
    if (fd < 0) goto error;

    backend->fd = fd;