[Crash-utility] bug in cmdline.c

Dave Anderson anderson at redhat.com
Thu Feb 16 19:06:46 UTC 2012



----- Original Message -----
> On 02/16/12 10:39, Dave Anderson wrote:
> >
> >
> > ----- Original Message -----
> >> $ cat>  test-in<<_EOF_
> >> + mod | cat>  test-out
> >> + _EOF_
> >> $ crash [....]
> >> crash>  <  test-in
> >> crash>  quit
> >> $ cat test-out
> >> crash>  mod | cat>  test-out
> >>       MODULE       NAME            SIZE  OBJECT FILE
> >> [....]
> >>
> >> That first line does not belong in "test-out".
> >> It is very noticeable if "cat" were trying to parse the "mod" output.
> >> WRT printf, you can always add another global:   trace_fp
> >> and let that one be the fp for writing trace logs.  But it should
> >> always be stdout.  (Well, "stderr", actually, but you are already
> >> printing your command traces to stdout.)
> >
> > What happens when the "silent" environment variable is set "on"?
> > (i.e., run "crash -s ..." or enter "set silent on" during runtime)
> 
> Obviously, that would not happen.  The issue is that the behavior
> is completely unanticipatable.  When you type in:
>     crash> mod | cat > test-out
> you get what you expect in "test-out".  When you put that into
> a sourced file, you get different results.  That is wrong, without
> regard to any silent settings.  The cause is this command trace stuff
> that gets inserted into the command output stream.  It doesn't
> belong.
> 
> Would you fix it, please?  Thank you.

No, I won't.  You're welcome. 

This discussion came up many years ago.  Some people want the command
interspersed and others do not.  The "silent" variable was the compromise.  

But, that's the beauty of open source -- you can do whatever you'd like
with your copy.

Dave

 




More information about the Crash-utility mailing list