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
3
THANKS
3
THANKS
@ -7,4 +7,5 @@ suggesting improvements or submitting changes. Some of these people are:
|
||||
Curt Micol <asenchi@asenchi.com>
|
||||
Eric Florenzano <floguy@gmail.com>
|
||||
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
|
||||
|
||||
def close_on_exec(fd):
|
||||
flags = fcntl.fcntl(fd, fcntl.F_GETFD) | fcntl.FD_CLOEXEC
|
||||
fcntl.fcntl(fd, fcntl.F_SETFL, flags)
|
||||
fcntl.fcntl(fd, fcntl.F_SETFD, fcntl.FD_CLOEXEC)
|
||||
|
||||
def set_non_blocking(fd):
|
||||
flags = fcntl.fcntl(fd, fcntl.F_GETFL) | os.O_NONBLOCK
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user