Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 126812 Details for
Bug 187597
portage-2.1.3.2 intermittently crashes on x86-fbsd when fcntl() F_SETFL returns EAGAIN
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
zmedico's eagain.patch
eagain.patch (text/plain), 1.40 KB, created by
Joe Peterson (RETIRED)
on 2007-08-03 15:10:41 UTC
(
hide
)
Description:
zmedico's eagain.patch
Filename:
MIME Type:
Creator:
Joe Peterson (RETIRED)
Created:
2007-08-03 15:10:41 UTC
Size:
1.40 KB
patch
obsolete
>Index: pym/portage.py >=================================================================== >--- pym/portage.py (revision 7547) >+++ pym/portage.py (working copy) >@@ -2416,32 +2416,28 @@ > fd_flags[f] = fcntl.fcntl(f.fileno(), fcntl.F_GETFL) > buffsize = 65536 > eof = False >+ # Use non-blocking mode to prevent read >+ # calls from blocking indefinitely. >+ try: >+ fcntl.fcntl(master_file.fileno(), fcntl.F_SETFL, >+ fd_flags[master_file] | os.O_NONBLOCK) >+ except EnvironmentError, e: >+ if e.errno != errno.EAGAIN: >+ raise >+ del e >+ # The EAGAIN error signals eof on FreeBSD. >+ eof = True > while not eof: > events = select.select(iwtd, owtd, ewtd) > for f in events[0]: >- # Use non-blocking mode to prevent read >- # calls from blocking indefinitely. >- try: >- fcntl.fcntl(f.fileno(), fcntl.F_SETFL, >- fd_flags[f] | os.O_NONBLOCK) >- except EnvironmentError, e: >- if e.errno != errno.EAGAIN: >- raise >- del e >- # The EAGAIN error signals eof on FreeBSD. >- eof = True >- break > buf = array.array('B') > try: > buf.fromfile(f, buffsize) > except EOFError: > pass >- fcntl.fcntl(f.fileno(), fcntl.F_SETFL, fd_flags[f]) > if not buf: > eof = True > break >- # Use blocking mode for writes since we'd rather block than >- # trigger a EWOULDBLOCK error. > if f is master_file: > buf.tofile(stdout_file) > stdout_file.flush()
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 187597
: 126812