[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] trouble using &

From: Pierre Gaston
Subject: Re: [Help-bash] trouble using &
Date: Mon, 15 Sep 2014 21:25:58 +0300

On Mon, Sep 15, 2014 at 6:52 PM, frank ernest <address@hidden> 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 &
> ps
> 3440 pts/0 00:00:00 bash
> 3491 pts/0 00:00:00 play
> 3492 pts/0 00:00:00 ps
> The file plays fine if I remove the last & .
> echo hello
> Works fine, so, what do I do? I know that changing ttys IE ctrl-alt-F*
> makes the audio stop (which makes sense because that if I'm playing a cool
> tune and you don't want to hear it you don't since your logged in on a
> different tty,) but I don't think & does that to the process.
> Thanks
> 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 &

reply via email to

[Prev in Thread] Current Thread [Next in Thread]