swsusp: fix suspending with mysqld

From: Pavel Machek
Date: Mon Oct 04 2004 - 08:36:50 EST


Hi!

mysqld does signal calls in pretty tight loop, and swsusp is not able
to stop processes in such case. This should fix it. Please apply,
Pavel


Index: linux/kernel/signal.c
===================================================================
--- linux.orig/kernel/signal.c 2004-10-01 12:24:26.000000000 +0200
+++ linux/kernel/signal.c 2004-10-01 01:00:26.000000000 +0200
@@ -1483,8 +1483,7 @@
unsigned long flags;
struct sighand_struct *psig;

- if (sig == -1)
- BUG();
+ BUG_ON(sig == -1);

/* do_notify_parent_cldstop should have been called instead. */
BUG_ON(tsk->state & (TASK_STOPPED|TASK_TRACED));
@@ -2260,6 +2259,8 @@
ret = -EINTR;
}

+ if (current->flags & PF_FREEZE)
+ refrigerator(1);
return ret;
}


--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/