26.10.2016, 21:34, Andres Freund kirjoitti:
> Any chance that plsh or the script it executes does anything with the file descriptors it inherits? That'd certainly
oneway to get into odd corruption issues.
>
> We processor really should use O_CLOEXEC for the majority of it file handles.
Attached a patch to always use O_CLOEXEC in BasicOpenFile if we're not
using EXEC_BACKEND. It'd be nice to not expose all fds to most
pl-languages either, but I guess there's no easy solution to that
without forcibly closing all fds whenever any functions are called.
/ Oskari