Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.misc > #1144

Re: Need help running mplayer in the background

From Robert Riches <spamtrap42@jacob21819.net>
Newsgroups comp.os.linux.misc
Subject Re: Need help running mplayer in the background
Date 2011-05-18 03:41 +0000
Organization none-at-all
Message-ID <slrnit6fvu.pdh.spamtrap42@one.localnet> (permalink)
References <93gr48Fjo7U2@mid.individual.net> <iqvdin$r3f$1@dont-email.me>

Show all headers | View raw


On 2011-05-18, Kevin Snodgrass <kdsnodgrass@yahoo.com> wrote:
> On Wed, 18 May 2011 03:01:28 +0000, General Schvantzkoph wrote:
>
>> I can't run mplayer in the background. This command works fine if I
>> execute it without the redirect but it gets suspended if I do a >& log
>> &. My real goal is to run it as a cron job, but it's getting killed when
>> cron executes it which I assume is the same problem as that I'm seeing
>> when I put it in the background. What am I missing?
>> 
>> mplayer -dumpstream http://2783.live.streamtheworld.com:443/WLSAM_SC -ac
>> mp3lacm -dumpfile /home/foobar/s_drive/mp3/stream/bob_${DAY}.mp3 >& log
>> &
>
> I do, functionally, the exact same thing and mplayer puts itself into the 
> background.
>
> My command line is something like:
> mplayer -prefer-ipv4 -dumpstream -dumpfile foobar.wma 
> mms://foo.bar.akamaistream.net/some/directory/struct/that/is/really/deep/
>
> This command, when run from the command line, puts itself in the 
> background and returns me to the command prompt.  I don't have to use a 
> '&' to achieve this, it is automagic.  Also, from a single script, I do 6 
> of this at a time, one right after the other and they all start and run 
> in parallel.
>
> BTW, I don't use cron, I use at.  cron runs things as root, whereas at 
> runs as the user that submitted the job.  Could that have something to do 
> with it?

You might try "setsid" before the command.  That might help.

Another possibility is that in some areas, different shells will
behave differently.  For example, a process put into the
background by csh will keep running when the parent shell exits,
but I understand sh/bash behave differently unless you give do a
nohup or something like that.

-- 
Robert Riches
spamtrap42@jacob21819.net
(Yes, that is one of my email addresses.)

Back to comp.os.linux.misc | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Need help running mplayer in the background General Schvantzkoph <schvantzkoph@yahoo.com> - 2011-05-18 03:01 +0000
  Re: Need help running mplayer in the background Kevin Snodgrass <kdsnodgrass@yahoo.com> - 2011-05-18 03:14 +0000
    Re: Need help running mplayer in the background Robert Riches <spamtrap42@jacob21819.net> - 2011-05-18 03:41 +0000
      Re: Need help running mplayer in the background General Schvantzkoph <schvantzkoph@yahoo.com> - 2011-05-18 13:39 +0000
        Re: Need help running mplayer in the background General Schvantzkoph <schvantzkoph@yahoo.com> - 2011-05-18 16:24 +0000
          Re: Need help running mplayer in the background Bill Marcum <bill@lat.localnet> - 2011-05-19 10:05 -0400
            Re: Need help running mplayer in the background General Schvantzkoph <schvantzkoph@yahoo.com> - 2011-05-19 17:41 +0000
              Re: Need help running mplayer in the background Robert Riches <spamtrap42@jacob21819.net> - 2011-05-20 03:43 +0000
        Re: Need help running mplayer in the background Huibert Bol <huibert.bol@quicknet.nl> - 2011-05-18 18:49 +0200
          Re: Need help running mplayer in the background General Schvantzkoph <schvantzkoph@yahoo.com> - 2011-05-18 18:15 +0000
    Re: Need help running mplayer in the background Eli the Bearded <*@eli.users.panix.com> - 2011-05-18 05:56 +0000
    Re: Need help running mplayer in the background Chris Davies <chris-usenet@roaima.co.uk> - 2011-05-19 22:54 +0100
  Re: Need help running mplayer in the background Chris Davies <chris-usenet@roaima.co.uk> - 2011-05-19 23:11 +0100
    Re: Need help running mplayer in the background General Schvantzkoph <schvantzkoph@yahoo.com> - 2011-05-20 01:44 +0000
      Re: Need help running mplayer in the background Aragorn <aragorn@chatfactory.invalid> - 2011-05-20 07:30 +0200
        Re: Need help running mplayer in the background General Schvantzkoph <schvantzkoph@yahoo.com> - 2011-05-20 11:46 +0000
      Re: Need help running mplayer in the background Chris Davies <chris-usenet@roaima.co.uk> - 2011-05-20 09:19 +0100
        Re: Need help running mplayer in the background General Schvantzkoph <schvantzkoph@yahoo.com> - 2011-05-20 11:56 +0000
          Re: Need help running mplayer in the background Chris Davies <chris-usenet@roaima.co.uk> - 2011-05-20 15:36 +0100
            Re: Need help running mplayer in the background General Schvantzkoph <schvantzkoph@yahoo.com> - 2011-05-20 18:28 +0000
        Re: Need help running mplayer in the background General Schvantzkoph <schvantzkoph@yahoo.com> - 2011-05-20 12:09 +0000

csiph-web