Merge lp:~akopytov/percona-xtrabackup/bug722638-1.6 into lp:percona-xtrabackup/1.6

Proposed by Alexey Kopytov
Status: Merged
Approved by: Stewart Smith
Approved revision: no longer in the source branch.
Merged at revision: 290
Proposed branch: lp:~akopytov/percona-xtrabackup/bug722638-1.6
Merge into: lp:percona-xtrabackup/1.6
Diff against target: 49 lines (+22/-0)
1 file modified
xtrabackup.c (+22/-0)
To merge this branch: bzr merge lp:~akopytov/percona-xtrabackup/bug722638-1.6
Reviewer Review Type Date Requested Status
Stewart Smith (community) Approve
Review via email: mp+76431@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Alexey Kopytov (akopytov) wrote :
Revision history for this message
Stewart Smith (stewart) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'xtrabackup.c'
2--- xtrabackup.c 2011-09-21 09:00:00 +0000
3+++ xtrabackup.c 2011-09-21 21:06:26 +0000
4@@ -1156,6 +1156,17 @@
5 { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
6 };
7
8+#ifndef __WIN__
9+static int debug_sync_resumed;
10+
11+static void sigcont_handler(int sig);
12+
13+static void sigcont_handler(int sig __attribute__((unused)))
14+{
15+ debug_sync_resumed= 1;
16+}
17+#endif
18+
19 UNIV_INLINE
20 void
21 debug_sync_point(const char *name)
22@@ -1190,9 +1201,14 @@
23 "Suspending at debug sync point '%s'. "
24 "Resume with 'kill -SIGCONT %u'.\n", name, (uint) pid);
25
26+ debug_sync_resumed= 0;
27 kill(pid, SIGSTOP);
28+ while (!debug_sync_resumed) {
29+ sleep(1);
30+ }
31
32 /* On resume */
33+ fprintf(stderr, "xtrabackup: DEBUG: removing the pid file.\n");
34 my_delete(pid_path, MYF(MY_WME));
35 #endif
36 }
37@@ -6215,6 +6231,12 @@
38 }
39 }
40
41+#ifndef __WIN__
42+ if (xtrabackup_debug_sync) {
43+ signal(SIGCONT, sigcont_handler);
44+ }
45+#endif
46+
47 /* --backup */
48 if (xtrabackup_backup)
49 xtrabackup_backup_func();

Subscribers

People subscribed via source and target branches