Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
0c3d787e
Commit
0c3d787e
authored
Oct 30, 2012
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fileobject: do not lose other flags when setting O_NONBLOCK flag
parent
ad5dd7b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
gevent/fileobject.py
gevent/fileobject.py
+2
-1
No files found.
gevent/fileobject.py
View file @
0c3d787e
...
@@ -26,6 +26,7 @@ else:
...
@@ -26,6 +26,7 @@ else:
from
gevent.socket
import
_fileobject
,
_get_memory
from
gevent.socket
import
_fileobject
,
_get_memory
cancel_wait_ex
=
IOError
(
EBADF
,
'File descriptor was closed in another greenlet'
)
cancel_wait_ex
=
IOError
(
EBADF
,
'File descriptor was closed in another greenlet'
)
from
gevent.os
import
make_nonblocking
try
:
try
:
from
gevent._util
import
SocketAdapter__del__
,
noop
from
gevent._util
import
SocketAdapter__del__
,
noop
...
@@ -56,7 +57,7 @@ else:
...
@@ -56,7 +57,7 @@ else:
self
.
_mode
=
mode
or
'rb'
self
.
_mode
=
mode
or
'rb'
self
.
_close
=
close
self
.
_close
=
close
self
.
_translate
=
'U'
in
self
.
_mode
self
.
_translate
=
'U'
in
self
.
_mode
fcntl
(
fileno
,
F_SETFL
,
os
.
O_NONBLOCK
)
make_nonblocking
(
fileno
)
self
.
_eat_newline
=
False
self
.
_eat_newline
=
False
self
.
hub
=
get_hub
()
self
.
hub
=
get_hub
()
io
=
self
.
hub
.
loop
.
io
io
=
self
.
hub
.
loop
.
io
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment