2 * "THE BEER-WARE LICENSE" (Revision 42):
3 * <tobias.rehbein@web.de> wrote this file. As long as you retain this notice
4 * you can do whatever you want with this stuff. If we meet some day, and you
5 * think this stuff is worth it, you can buy me a beer in return.
12 #include <sys/types.h>
18 /* Global variables */
19 extern options_t options
;
20 static pid_t pid
= (pid_t
) (-1);
23 player_play(oggfile_t
*oggfile
)
29 switch (lpid
= fork()) {
31 execl(options
.ogg123
, "ogg123", "-q", oggfile
->filename
, NULL
);
32 err(1, "could not exec %s", options
.ogg123
);
34 err(1, "could not fork player");
44 if (pid
!= (pid_t
) (-1)) {
45 if (kill(pid
, SIGHUP
))
46 err(1, "could not kill running player");