wmclockmon: remove obsolete `GTK_CALENDAR_WEEK_START_MONDAY`
[dockapps.git] / fookb / sound.c
blobba324608ceb972dc638d2416d7355e6d58f08837
1 /*
2 * File: sound.c
4 * (c) 1998-2004 Alexey Vyskubov <alexey@mawhrin.net>
5 */
7 #include <unistd.h> /* fork() */
8 #include <sys/types.h> /* pid_t */
9 #include <stdlib.h> /* system */
10 #include <errno.h>
11 #include <stdio.h> /* puts() */
12 #include <string.h>
15 #include "sound.h"
16 #include "params.h"
18 void drip()
21 pid_t pid;
23 pid = fork();
25 if (pid == (pid_t) (-1)) {
26 puts("Cannot fork!");
27 switch (errno) {
28 case ENOMEM:
29 puts("Not enough memory!");
30 exit(22);
31 break;
32 case EAGAIN:
33 puts("To many processes!");
34 exit(23);
35 break;
36 default:
37 puts("Unknown error, please report!");
41 if (pid == (pid_t) 0) {
42 return;
45 if (!strcmp(read_param("Sound"), "Yes")) {
46 exit(system(read_param("Command")));
47 } else {
48 exit(0);