Bug 105366 - RFE: correct strace behaviour for piped output
RFE: correct strace behaviour for piped output
Status: CLOSED ERRATA
Product: Red Hat Raw Hide
Classification: Retired
Component: strace (Show other bugs)
1.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Roland McGrath
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-09-25 10:16 EDT by Dmitry V. Levin
Modified: 2016-12-13 16:51 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-12-19 12:57:56 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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 10:17 EDT, Dmitry V. Levin
no flags Details
proposed patch (2.20 KB, patch)
2003-09-25 10:18 EDT, Dmitry V. Levin
no flags Details | Diff
proposed patch (set line buffering for piped output) (423 bytes, patch)
2003-12-14 17:25 EST, Dmitry V. Levin
no flags Details | Diff

  None (edit)
Description Dmitry V. Levin 2003-09-25 10:16:18 EDT
Description of problem: 
Format of piped output generated by strace distinguishes from redirected output.  
 
Version-Release number of selected component (if applicable): 
4.4.99 
 
How reproducible: 
Always 
 
Steps to Reproduce: 
1. 
gcc -Wall -Werror system.c -o system 
2. 
strace -fF -o redirect.log ./system 
3. 
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 10:17:37 EDT
Created attachment 94714 [details]
system.c
Comment 2 Dmitry V. Levin 2003-09-25 10:18:41 EDT
Created attachment 94715 [details]
proposed patch
Comment 3 Roland McGrath 2003-11-06 21:25:31 EST
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 17:22:36 EST
Thanks. 
However, you haven't applied the change to set line buffering for piped output. 
Comment 5 Dmitry V. Levin 2003-12-14 17:25:19 EST
Created attachment 96529 [details]
proposed patch (set line buffering for piped output)
Comment 6 John Flanagan 2003-12-19 12:57:56 EST
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.

http://rhn.redhat.com/errata/RHBA-2003-294.html
Comment 7 Roland McGrath 2004-01-13 05:20:52 EST
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 18:39:53 EST
Indeed. 

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