Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
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
Zope
Commits
30791b3b
Commit
30791b3b
authored
Jan 21, 2002
by
Brian Lloyd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added fix for collector #157: hang on linux 2.2.
parent
7038f9fd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
4 deletions
+20
-4
ZServer/medusa/asyncore.py
ZServer/medusa/asyncore.py
+10
-2
lib/python/ZServer/medusa/asyncore.py
lib/python/ZServer/medusa/asyncore.py
+10
-2
No files found.
ZServer/medusa/asyncore.py
View file @
30791b3b
...
...
@@ -53,7 +53,7 @@ import sys
import
os
from
errno
import
EALREADY
,
EINPROGRESS
,
EWOULDBLOCK
,
ECONNRESET
,
\
ENOTCONN
,
ESHUTDOWN
,
EINTR
,
EISCONN
ENOTCONN
,
ESHUTDOWN
,
EINTR
,
EISCONN
,
EAGAIN
try
:
socket_map
...
...
@@ -521,7 +521,15 @@ if os.name == 'posix':
self
.
fd
=
fd
def
recv
(
self
,
*
args
):
return
apply
(
os
.
read
,
(
self
.
fd
,)
+
args
)
# NOTE: this is a difference from the Python 2.2 library
# version of asyncore.py. This prevents a hanging condition
# on Linux 2.2 based systems.
while
1
:
try
:
return
apply
(
os
.
read
,
(
self
.
fd
,)
+
args
)
except
exceptions
.
OSError
,
why
:
if
why
[
0
]
!=
EAGAIN
:
raise
def
send
(
self
,
*
args
):
return
apply
(
os
.
write
,
(
self
.
fd
,)
+
args
)
...
...
lib/python/ZServer/medusa/asyncore.py
View file @
30791b3b
...
...
@@ -53,7 +53,7 @@ import sys
import
os
from
errno
import
EALREADY
,
EINPROGRESS
,
EWOULDBLOCK
,
ECONNRESET
,
\
ENOTCONN
,
ESHUTDOWN
,
EINTR
,
EISCONN
ENOTCONN
,
ESHUTDOWN
,
EINTR
,
EISCONN
,
EAGAIN
try
:
socket_map
...
...
@@ -521,7 +521,15 @@ if os.name == 'posix':
self
.
fd
=
fd
def
recv
(
self
,
*
args
):
return
apply
(
os
.
read
,
(
self
.
fd
,)
+
args
)
# NOTE: this is a difference from the Python 2.2 library
# version of asyncore.py. This prevents a hanging condition
# on Linux 2.2 based systems.
while
1
:
try
:
return
apply
(
os
.
read
,
(
self
.
fd
,)
+
args
)
except
exceptions
.
OSError
,
why
:
if
why
[
0
]
!=
EAGAIN
:
raise
def
send
(
self
,
*
args
):
return
apply
(
os
.
write
,
(
self
.
fd
,)
+
args
)
...
...
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