diff src/sound.c @ 3004:bfd2b1ef907c

[gaim-migrate @ 3017] Don't fork for console beeps anymore. Fixed a bug reported by Mike Owens. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Mon, 04 Mar 2002 18:43:27 +0000
parents e27517a5c28e
children 00ce285e3ed1
line wrap: on
line diff
--- a/src/sound.c	Mon Mar 04 17:22:57 2002 +0000
+++ b/src/sound.c	Mon Mar 04 18:43:27 2002 +0000
@@ -391,17 +391,18 @@
 	return;
 #endif
 
+	if (sound_options & OPT_SOUND_BEEP) {
+		gdk_beep();
+		return;
+	}
+
 	pid = fork();
 
 	if (pid < 0)
 		return;
 	else if (pid == 0) {
 		alarm(30);
-		if (sound_options & OPT_SOUND_BEEP) {
-			gdk_beep();
-			_exit(0);
-		}
-
+		
 		if (sound_cmd[0]) {
 			char *args[4];
 			char command[4096];
@@ -455,20 +456,21 @@
 	return;
 #endif
 
+	if (sound_options & OPT_SOUND_BEEP) {
+		gdk_beep();
+		return;
+	}
 	pid = fork();
-
+	
 	if (pid < 0)
 		return;
 	else if (pid == 0) {
 		alarm(30);
-		if (sound_options & OPT_SOUND_BEEP) {
-			gdk_beep();
-			_exit(0);
-		}
+		
 #ifdef ESD_SOUND
 		/* ESD is our player of choice.  Are we OK to
 		 * go there? */
-		else if (sound_options & OPT_SOUND_ESD) {
+		if (sound_options & OPT_SOUND_ESD) {
 			if (can_play_esd()) {
 				if (play_esd(data, size))
 					_exit(0);