I guess I should've specified that I'm trying to implement this as a cgi script. I've used programs that are designed like the Winamp::Control program, and if Winamp crashes you just out of luck. The idea is to implement this as a cgi script and use system to launch winamp if needed.
Alas, it appears I may have to resort to this if I don't want to learn c right now. Maybe I'll try to figure out how to modify Winamp::Control to use a CGI interface instead of the httpQ plugin.
So, my original question still stands.