Do without usage of O_CLOEXEC flag

Due to some systems not supporting open() with O_CLOEXEC, setting of the close-on-exec file descriptor flag is performed in a different fashion. See http://man7.org/tlpi/code/online/diff/filelock/create_pid_file.c.html