[PLUG] Extracting the pid - Resolved
Richard Steffens
rsteff at attbi.com
Wed May 22 22:26:01 UTC 2002
Ross Brattain wrote:
> In a shell $! is the PID of the last backgrounded process.
> So a shell script wrapper that background mpg123 and saves $! might
> work.
>
> example:
> #!/bin/bash
>
> mpg123 $* &
> echo $!
I'll file this one for future reference. Someday I may need to apply the
technique in another project. I don't see how is makes things simpler
for this project. However,
"Kenneth G. Stephens" wrote:
>
> killall mpg123
this one really does make things simple. For the purposes of my
exercise, there would only be one process running mpg123 so I wouldn't
be concerned with shutting down others along with the one I want, and it
means that I don't have to invoke the step that figures out the pid.
That seems the cleanest to me.
Thanks again to all.
--
Regards,
Dick Steffens
"Quando Omni Flunkus Moritati"
http://rsteff.home.attbi.com/
More information about the PLUG
mailing list