[icecast] capturing pid from command line

Brendan Cully brendan at xiph.org
Tue Nov 4 17:24:31 PST 2003



On Tuesday, 04 November 2003 at 18:12, Dave St John wrote:
> tried that already but it doesnt catch the parent, it captures one of the
> children.
> 
> Would the fact that the server runs as a user and not as root having
> anything to do with $! not working, since it works with shoutcast
> running as root?

...
> > icecast -c /path/icecast.xml &
> > echo $!
...

off the top of my head, to get the parent of $! you might try
something like:

child=$!
parent=`ps -ef | egrep "^[a-z]+ *$child" | awk '{print $3}'

-b
--- >8 ----
List archives:  http://www.xiph.org/archives/
icecast project homepage: http://www.icecast.org/
To unsubscribe from this list, send a message to 'icecast-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Icecast mailing list