Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 1479243 Details for
Bug 1623070
(s390x only) sos skips collecting random data due to pipe returncode None
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
reproducer script
repro_pipe_unfinished.py (text/plain), 1.22 KB, created by
Pavel Moravec
on 2018-08-28 12:40:05 UTC
(
hide
)
Description:
reproducer script
Filename:
MIME Type:
Creator:
Pavel Moravec
Created:
2018-08-28 12:40:05 UTC
Size:
1.22 KB
patch
obsolete
>import threading >import os >from subprocess import Popen, PIPE, STDOUT > >cmd_to_call=['/usr/bin/grep', '-q', 'localhost', '/etc/hosts'] ># variant for nonempty stdout: ># cmd_to_call=['/usr/bin/grep', 'localhost', '/etc/hosts'] > >class AsyncReader(threading.Thread): > > def __init__(self, channel): > super(AsyncReader, self).__init__() > self.chan = channel > self.output = '' > self.start() > self.join() > > def run(self): > try: > while True: > line = self.chan.read(2048) > if not line: > # Pipe can remain open after output has completed > print "EOF received, to break" > break > self.output = self.output + line > except (ValueError, IOError): > # pipe has closed, meaning command output is done > print "pipe closed" > pass > > def get_contents(self): > return self.output > >p = Popen(cmd_to_call, shell=False, stdout=PIPE, > stderr=PIPE, bufsize=-1,# env=os.environ.copy(), > close_fds=True) > >reader = AsyncReader(p.stdout) >stdout = reader.get_contents() >pollstatus = p.poll() >print("output: '%s', return code: %s, pollstatus=%s" % (stdout, p.returncode, pollstatus))
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 Raw
Actions:
View
Attachments on
bug 1623070
: 1479243 |
1479244
|
1479245