[packman] gst123 segfaults
David Haller
dnh at opensuse.org
Thu Aug 1 21:35:19 CEST 2013
Hello,
On Thu, 01 Aug 2013, Carlos E. R. wrote:
>On Tuesday, 2013-07-30 at 20:43 +0200, David Haller wrote:
>>On Tue, 30 Jul 2013, Carlos E. R. wrote:
>
>>Call it as "TERM=linux gst123 ..."
>
>Are you sure? It is running as a cron job, there is no terminal.
Yes! There's a stdout/stderr and gst123 wants to know _how_ to output
the stuff. Using "TERM=linux" corresponds to the linux console you get
in RL3/without starting X. And (see your next mail) if gst123 gets a
TERM, it knows how to handle. Because it is obviously using tput and
that needs some settings how to handle the "terminal".
>>>What matters to me is the unclean exit, not the sound. The program
>>>does its job fine. What bothers me is the stderr output that I can
>>>not silence.
>>
>>Run it with '2>/dev/null' (or redirect to a logfile).
>
>But I do!
>
>I run it this way:
>
>cron:
>
> -0,30 * * * * cer /home/cer/bin/dar_la_hora_en_cron hora
>
>script:
>
> echo "CER: using gst123"
> /usr/bin/gst123 --quiet $TEMPORAL 2>&1 > /tmp/dar_la_hora_en_cron.log
>
>I understand that the construction "2>&1 >" should dump _everything_
>to the log... well, it does not.
And it should not. Consider:
First you have '2>&1'. That redirects stderr to the _CURRENT_ stdout.
I.e. the terminal. Only _THEN_ you redirect stdout to the log.
>Why? It must be because gst123 is not using standard output methods.
Nope. Your fault. For your enlightenment:
$ { echo err >&2; echo out; } 2>&1 > t.log
err
$ cat t.log
out
$ { echo err >&2; echo out; } > t.log 2>&1
$ cat t.log
err
out
You need to _FIRST_ redirect stdout to the log and _THEN_ stderr to
stdout (i.e. then the file). Or just redirect both explicitly, i.e.:
... >t.log 2>t.log
or even the whole script by redirecting at the top of the script:
exec 1>>./t.log
exec 2>>./t.err
(in this case to two different logs for stdout and stderr).
>It dumps this instead to the mail (cron):
>
> CER: using gst123
> tput: No value for $TERM and no -T specified
> Cannot connect to server socket err = No such file or directory
> Cannot connect to server request channel
> jack server is not running or cannot be started
That's normal: cron mails stderr (and stdout IIRC) it receives to a
mail. So it works as designed and expected.
About that "socket" error re jack: you may want to configure vlc
explicitly not to use jack for output. Not sure where that's saved
and saved ATM.
>And the log is empty!
See above ;)
>However, if I call the same script from a terminal, it is quiet:
That's because you then have a TERM that tput knows to handle and
stdin/-err are handled as usual ...
The reason is AFAIR because vlc usually emits escape-sequences to
color the output (of errors and other messages) (c.f. 'man
console_codes') by using tput in normal operation. See the output of
vlc --play-and-exit foo.something
cvlc --play-and-exit foo.something
started from a xterm (you'll get at least green and a bold bits...).
And do not worry Carlos, you'll remember and/or learn such stuff
eventually ;) And if you don't, you still got the ML (and me
specifically) :)
HTH,
-dnh, sorry for the overlong sig, it's just too hard to shorten
--
Sex COULD kill you. Do you know what the human body goes through when you have
sex? Pupils dilate, arteries constrict, core temperature rises, heart races,
blood pressure skyrockets, respiration becomes rapid and shallow, the brain
fires bursts of electrical impulses from nowhere to nowhere, and secretions
spit out of every gland, and the muscles tense and spasm like you're lifting
three times your body weight. It's violent. It's ugly. And it's messy. And if
God hadn't made it UNBELIEVABLY fun, the human race would have died out eons
ago. -- "Dr. Allison Cameron", on "House, M.D."
More information about the Packman
mailing list