Fixed a race condition on abort with stdio writing which could cause SIGSEGV

ZeroSixFour
Thomas Schmitt 14 years ago
parent 8c56ca131f
commit d74b1a2008
  1. 2
      cdrskin/cdrskin_timestamp.h
  2. 10
      libburn/drive.c

@ -1 +1 @@
#define Cdrskin_timestamP "2009.03.02.170126"
#define Cdrskin_timestamP "2009.03.02.193353"

@ -1757,10 +1757,18 @@ int burn_abort(int patience,
occup = burn_drive_is_occupied(&(drive_array[i]));
if(occup == -2)
continue;
#ifdef NIX
/* <<< this causes a race condition with drive usage
and drive disposal
*/
if(drive_array[i].drive_role != 1) {
drive_array[i].busy = BURN_DRIVE_IDLE;
burn_drive_forget(&(drive_array[i]), 1);
} else if(occup <= 10) {
} else
#endif /* NIX */
if(occup <= 10) {
burn_drive_forget(&(drive_array[i]), 1);
} else if(occup <= 100) {
if(first_round)

Loading…
Cancel
Save