Csound Csound-dev Csound-tekno Search About

[Csnd] stdlib vs stderr

Date2014-08-30 19:20
FromEduardo Moguillansky
Subject[Csnd] stdlib vs stderr
Hi,

this might me my confussion regarding the proper behaviour of a unix program in terms of what gets sent to stdout and what gets sent to stderr, but I would prefer that

$ csound -odac --get-system-sr

would output the samplerate to stdout and all the other information and warnings to stderr, instead of the current behaviour, which is to send everything to stderr.

Then it would not be necessary to parse all the warnings and other information in stderr to fish for the desired data, which is possible but feels somewhat fragile.

Best,
Eduardo Moguillansky

Date2014-08-30 19:32
FromJustin Smith
SubjectRe: [Csnd] stdlib vs stderr
If I recall correctly, the reason for sending all csound text output to stderr is to allow shell pipelines for audio data.


On Sat, Aug 30, 2014 at 11:20 AM, Eduardo Moguillansky <eduardo.moguillansky@gmail.com> wrote:
Hi,

this might me my confussion regarding the proper behaviour of a unix program in terms of what gets sent to stdout and what gets sent to stderr, but I would prefer that

$ csound -odac --get-system-sr

would output the samplerate to stdout and all the other information and warnings to stderr, instead of the current behaviour, which is to send everything to stderr.

Then it would not be necessary to parse all the warnings and other information in stderr to fish for the desired data, which is possible but feels somewhat fragile.

Best,
Eduardo Moguillansky


Date2014-08-30 22:03
Frommoguillansky
Subject[Csnd] Re: stdlib vs stderr
Yes, I would have supposed the same, but in the case of "--sample-rate" or "--devices" there is no audio data because these arguments tell csound to output the given information and then exit.




On Sat, Aug 30, 2014 at 8:33 PM, Justin Smith [via Csound] <[hidden email]> wrote:
If I recall correctly, the reason for sending all csound text output to stderr is to allow shell pipelines for audio data.


On Sat, Aug 30, 2014 at 11:20 AM, Eduardo Moguillansky <[hidden email]> wrote:
Hi,

this might me my confussion regarding the proper behaviour of a unix program in terms of what gets sent to stdout and what gets sent to stderr, but I would prefer that

$ csound -odac --get-system-sr

would output the samplerate to stdout and all the other information and warnings to stderr, instead of the current behaviour, which is to send everything to stderr.

Then it would not be necessary to parse all the warnings and other information in stderr to fish for the desired data, which is possible but feels somewhat fragile.

Best,
Eduardo Moguillansky




If you reply to this email, your message will be added to the discussion below:
http://csound.1045644.n5.nabble.com/stdlib-vs-stderr-tp5737244p5737245.html
To start a new topic under Csound - General, email [hidden email]
To unsubscribe from Csound, click here.
NAML



View this message in context: Re: stdlib vs stderr
Sent from the Csound - General mailing list archive at Nabble.com.