* Remove 300 second timeout so large downloads work in ecore_con.
+2011-02-22 Carsten Haitzler (The Rasterman)
+
+ * Fix: ecore-file inotify fd would be duplicated in children
+ on fork. Have it detecti this on next monitor add and re-init the
+ inotify fd and fd handler.
+
static Ecore_Fd_Handler *_fdh = NULL;
static Ecore_File_Monitor *_monitors = NULL;
+static pid_t _inotify_fd_pid = -1;
static Eina_Bool _ecore_file_monitor_inotify_handler(void *data, Ecore_Fd_Handler *fdh);
static Ecore_File_Monitor *_ecore_file_monitor_inotify_monitor_find(int wd);
fd = inotify_init();
if (fd < 0)
return 0;
-
+
_fdh = ecore_main_fd_handler_add(fd, ECORE_FD_READ, _ecore_file_monitor_inotify_handler,
NULL, NULL, NULL);
if (!_fdh)
return 0;
}
+ _inotify_fd_pid = getpid();
return 1;
}
ecore_main_fd_handler_del(_fdh);
close(fd);
}
+ _inotify_fd_pid = -1;
return 1;
}
Ecore_File_Monitor *em;
int len;
+ if (_inotify_fd_pid == -1) return NULL;
+
+ if (_inotify_fd_pid != getpid())
+ {
+ ecore_file_monitor_inotify_shutdown();
+ ecore_file_monitor_inotify_init();
+ }
+
em = calloc(1, sizeof(Ecore_File_Monitor_Inotify));
if (!em) return NULL;