Bug 105366 - RFE: correct strace behaviour for piped output
Summary: RFE: correct strace behaviour for piped output
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: strace (Show other bugs)
(Show other bugs)
Version: 1.0
Hardware: All Linux
Target Milestone: ---
Assignee: Roland McGrath
QA Contact:
Keywords: FutureFeature
Depends On:
TreeView+ depends on / blocked
Reported: 2003-09-25 14:16 UTC by Dmitry V. Levin
Modified: 2016-12-13 21:51 UTC (History)
0 users

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-12-19 17:57:56 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
system.c (83 bytes, text/plain)
2003-09-25 14:17 UTC, Dmitry V. Levin
no flags Details
proposed patch (2.20 KB, patch)
2003-09-25 14:18 UTC, Dmitry V. Levin
no flags Details | Diff
proposed patch (set line buffering for piped output) (423 bytes, patch)
2003-12-14 22:25 UTC, Dmitry V. Levin
no flags Details | Diff

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2003:294 normal SHIPPED_LIVE New strace package fixes numerous bugs 2003-12-19 05:00:00 UTC
Red Hat Product Errata RHBA-2003:361 normal SHIPPED_LIVE New strace package fixes numerous bugs 2003-11-18 05:00:00 UTC

Description Dmitry V. Levin 2003-09-25 14:16:18 UTC
Description of problem: 
Format of piped output generated by strace distinguishes from redirected output.  
Version-Release number of selected component (if applicable): 
How reproducible: 
Steps to Reproduce: 
gcc -Wall -Werror system.c -o system 
strace -fF -o redirect.log ./system 
strace -fF -o '|cat >pipe.log' ./system 
Actual results: 
redirect.log and pipe.log are essentially different. 
Expected results: 
redirect.log and pipe.log should look about the same. 
Rationale: piped output feature is oftenly used to process output by non-interactive filter. 
So it requires offline-style output and line buffering.

Comment 1 Dmitry V. Levin 2003-09-25 14:17:37 UTC
Created attachment 94714 [details]

Comment 2 Dmitry V. Levin 2003-09-25 14:18:41 UTC
Created attachment 94715 [details]
proposed patch

Comment 3 Roland McGrath 2003-11-07 02:25:31 UTC
I've put a slightly different but equivalent patch in upstream.
The next Fedora Core update package will have it.

Comment 4 Dmitry V. Levin 2003-12-14 22:22:36 UTC
However, you haven't applied the change to set line buffering for piped output. 

Comment 5 Dmitry V. Levin 2003-12-14 22:25:19 UTC
Created attachment 96529 [details]
proposed patch (set line buffering for piped output)

Comment 6 John Flanagan 2003-12-19 17:57:56 UTC
An errata has been issued which should help the problem described in this bug report. 
This report is therefore being closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, please follow the link below. You may reopen 
this bug report if the solution does not work for you.


Comment 7 Roland McGrath 2004-01-13 10:20:52 UTC
Your extra patch is superfluous.  See the setvbuf call later in the
function.  setlinebuf is not portable, btw.

Comment 8 Dmitry V. Levin 2004-03-03 23:39:53 UTC

Note You need to log in before you can comment on or make changes to this bug.