Added closeexec and nonblock options