[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] trouble using &
From: |
Bob Proulx |
Subject: |
Re: [Help-bash] trouble using & |
Date: |
Mon, 15 Sep 2014 13:41:56 -0600 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
Pierre Gaston wrote:
> frank ernest wrote:
> > Hi, I was trying to play a wav file using play and I can't seem to get it
> > to fork into the background while still playing. I've tried using coproc,
> > and & but nothing seems to work (ctrl-Z would stop the process,) here is a
> > real code snippet:
> >
> > play "All night long.wav" &> /dev/null &
> > ...
>
> it tries to read from the terminal and thus stops when in the background,
> also redirect stdin:
> play "All night long.wav" &> /dev/null </dev/null &
Using -q will tell "play" not to print all of the verbose messaging to
the standard output. If putting it into the background then better to
use the play -q option.
I would rather not see stderr discarded to /dev/null so that any
errors that occur will be seen.
This following works fine for me.
play -q file.wav &
I can also switch to the Linux virtual console and it keeps playing.
I am not sure why it would stop. Perhaps some interaction with
policykit, systemd-login0, or some such which might be actively trying
to prevent it?
Bob
Re: [Help-bash] trouble using &, frank ernest, 2014/09/16