-
Committer:
Teddy Hogeborn
-
Date:
2014-06-14 22:55:11 UTC
-
mto:
(237.7.272 trunk)
-
Revision ID:
teddy@recompile.se-20140614225511-0ge6tce2esulf65t
In plugin-runner, do scandirat() or scandir() instead of readdir().
* plugin-runner.c (set_cloexec_flag): Only define if O_CLOEXEC is not
defined, it is not called
otherwise.
(main): Remove variables "dir" and "dirst"; new variable "dir_fd".
Use scandirat() if available, scandir() otherwise, both
using new filter function "good_name". Removed checking of
plugin file name patterns; this is now done by "good_name".
Do not set FD_CLOEXEC flag on plugin_fd, since fexecve()
will not work with it. Use pipe2() to set O_CLOEXEC on pipe
FD's (if possible).
(main/good_name): New filter function for scandirat() or scandir().