[Pkg-libburnia-devel] Bug#617409: brasero: Brasero corrupts all blank CD-R when burning (was: additional info)

George Danchev danchev at spnet.net
Thu Jul 5 09:57:41 UTC 2012


Hi,

I'd suggest the attached patch to be applied, so we can better see what 
happens to the growisofs child process.

The code unconditinally calls WEXITSTATUS (status) without making sure that 
WIFEXITED has returned true. This is undefined... but whatever - a separate 
issue. (also I don't actually like brasero_process_watch_child() to be 
utilized like that: g_timeout_add (500, brasero_process_watch_child, process);
but this could be tweaked later)


Reporters, could you please do the following:

apt-get source brasero
apt-get build-dep brasero

put the attached patch in debian/patches/
echo check-child-status >> debian/patches/series

dpkg-buildpackage

and install this one... then try to reproduce the promlem, and get us the logs 
so we can better see what is going on with our beloved growisofs process.

-- 
pub 4096R/0E4BD0AB <people.fccf.net/danchev/key pgp.mit.edu>
-------------- next part --------------

--- brasero-3.4.1.orig/libbrasero-burn/burn-process.c
+++ brasero-3.4.1/libbrasero-burn/burn-process.c
@@ -294,12 +294,27 @@ brasero_process_watch_child (gpointer da
 	 * brasero_job_finished/_error is called before the pipes are closed so
 	 * as to let plugins read stderr / stdout till the end and set a better
 	 * error message or simply decide all went well, in one word override */
-	priv->return_status = WEXITSTATUS (status);
+/*
+	priv->return_status =  WEXITSTATUS (status);
+*/
 	priv->watch = 0;
 	priv->pid = 0;
-
+	if (WIFEXITED(status)) { /* WEXITSTATUS macro should only be used if WIFEXITED returned true */
+	        printf("process exited, status=%d\n", WEXITSTATUS(status));
+		priv->return_status = WEXITSTATUS (status);
+		BRASERO_JOB_LOG (data, "process exited with status %d", WEXITSTATUS (status));
+	}
+	else if (WIFSIGNALED(status)) {
+	        printf("process killed by signal %d\n", WTERMSIG(status));
+		BRASERO_JOB_LOG (data, "process killed by signal %d", WTERMSIG(status));
+	}
+	else if (WIFSTOPPED(status)) {
+	        printf("process stopped by signal %d\n", WSTOPSIG(status));
+		BRASERO_JOB_LOG (data, "process stopped by signal %d", WSTOPSIG(status));
+	}
+/*
 	BRASERO_JOB_LOG (data, "process finished with status %i", WEXITSTATUS (status));
-
+*/
 	result = brasero_process_finished (data);
 	if (result == BRASERO_BURN_RETRY) {
 		GError *error = NULL;


More information about the Pkg-libburnia-devel mailing list