Root/package/xfsprogs/patches/120-portability.patch

1--- a/copy/xfs_copy.c
2+++ b/copy/xfs_copy.c
3@@ -463,6 +463,15 @@ read_ag_header(int fd, xfs_agnumber_t ag
4 }
5 
6 
7+static void sig_mask(int type)
8+{
9+ sigset_t mask;
10+ sigemptyset(&mask);
11+ sigaddset(&mask, SIGCHLD);
12+ sigprocmask(type, &mask, NULL);
13+}
14+
15+
16 void
17 write_wbuf(void)
18 {
19@@ -478,9 +487,9 @@ write_wbuf(void)
20         if (target[i].state != INACTIVE)
21             pthread_mutex_unlock(&targ[i].wait); /* wake up */
22 
23- sigrelse(SIGCHLD);
24+ sig_mask(SIG_UNBLOCK);
25     pthread_mutex_lock(&mainwait);
26- sighold(SIGCHLD);
27+ sig_mask(SIG_BLOCK);
28 }
29 
30 
31@@ -847,7 +856,7 @@ main(int argc, char **argv)
32     /* set up sigchild signal handler */
33 
34     signal(SIGCHLD, handler);
35- sighold(SIGCHLD);
36+ sig_mask(SIG_BLOCK);
37 
38     /* make children */
39 
40

Archive Download this file



interactive