mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Fix close_on_exec bug.
Reported by Sergey Shepelev. I changed his patch slightly because of the man page language. As I read things, the close on exec flag is separate from the F_SETFL flags.
This commit is contained in:
parent
562c9a2d70
commit
09b5dd2ad1
1
THANKS
1
THANKS
@ -8,3 +8,4 @@ Curt Micol <asenchi@asenchi.com>
|
|||||||
Eric Florenzano <floguy@gmail.com>
|
Eric Florenzano <floguy@gmail.com>
|
||||||
Johan Bergström <bugs@bergstroem.nu>
|
Johan Bergström <bugs@bergstroem.nu>
|
||||||
Xavier Grangier <grangier@gmail.com>
|
Xavier Grangier <grangier@gmail.com>
|
||||||
|
Sergey Shepelev <temotor@gmail.com>
|
||||||
|
|||||||
@ -76,8 +76,7 @@ def get_maxfd():
|
|||||||
return maxfd
|
return maxfd
|
||||||
|
|
||||||
def close_on_exec(fd):
|
def close_on_exec(fd):
|
||||||
flags = fcntl.fcntl(fd, fcntl.F_GETFD) | fcntl.FD_CLOEXEC
|
fcntl.fcntl(fd, fcntl.F_SETFD, fcntl.FD_CLOEXEC)
|
||||||
fcntl.fcntl(fd, fcntl.F_SETFL, flags)
|
|
||||||
|
|
||||||
def set_non_blocking(fd):
|
def set_non_blocking(fd):
|
||||||
flags = fcntl.fcntl(fd, fcntl.F_GETFL) | os.O_NONBLOCK
|
flags = fcntl.fcntl(fd, fcntl.F_GETFL) | os.O_NONBLOCK
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user