summaryrefslogtreecommitdiffstats
path: root/recipes/ostree/ostree/Workaround-the-SIGCHLD-handler-issue.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/ostree/ostree/Workaround-the-SIGCHLD-handler-issue.patch')
-rw-r--r--recipes/ostree/ostree/Workaround-the-SIGCHLD-handler-issue.patch54
1 files changed, 54 insertions, 0 deletions
diff --git a/recipes/ostree/ostree/Workaround-the-SIGCHLD-handler-issue.patch b/recipes/ostree/ostree/Workaround-the-SIGCHLD-handler-issue.patch
new file mode 100644
index 0000000..ece69b8
--- /dev/null
+++ b/recipes/ostree/ostree/Workaround-the-SIGCHLD-handler-issue.patch
@@ -0,0 +1,54 @@
1From c7cf5cb80c57423e707d87013050c6f9cc6f6d37 Mon Sep 17 00:00:00 2001
2From: Gatis Paeglis <gatis.paeglis@qt.io>
3Date: Tue, 18 Oct 2016 12:19:57 +0200
4Subject: [PATCH] Workaround the SIGCHLD handler issue
5
6REF: https://bugreports.qt.io/browse/QTBUG-56338
7---
8 src/libostree/ostree-bootloader-grub2.c | 30 ++++++++++++++++++++++--------
9 1 file changed, 22 insertions(+), 8 deletions(-)
10
11diff --git a/src/libostree/ostree-bootloader-grub2.c b/src/libostree/ostree-bootloader-grub2.c
12index f3dc8e1..2c60b80 100644
13--- a/src/libostree/ostree-bootloader-grub2.c
14+++ b/src/libostree/ostree-bootloader-grub2.c
15@@ -380,14 +380,28 @@ _ostree_bootloader_grub2_write_config (OstreeBootloader *bootloader,
16
17 Upstream is fixed though.
18 */
19- proc = g_subprocess_launcher_spawn (launcher, error,
20- grub_exec, "-o",
21- gs_file_get_path_cached (new_config_path),
22- NULL);
23-
24- if (!g_subprocess_wait_check (proc, cancellable, error))
25- goto out;
26-
27+ //proc = g_subprocess_launcher_spawn (launcher, error,
28+ // grub_exec, "-o",
29+ // gs_file_get_path_cached (new_config_path),
30+ // NULL);
31+
32+ //if (!g_subprocess_wait_check (proc, cancellable, error))
33+ // goto out;
34+ {
35+ // REF: https://bugreports.qt.io/browse/QTBUG-56338
36+ // We do not use the chroot (grub2_child_setup) code path, so we do not
37+ // care about GSubprocessLauncher and the custom envvars passed to it.
38+ const char *cmd = glnx_strjoina (grub_exec, " -o ", gs_file_get_path_cached (new_config_path));
39+ FILE *fp = popen(cmd, "r");
40+ if (!fp) {
41+ glnx_set_prefix_error_from_errno (error, "popen (%s)", cmd);
42+ goto out;
43+ }
44+ if (pclose(fp) == -1) {
45+ glnx_set_prefix_error_from_errno (error, "pclose (%s)", cmd);
46+ goto out;
47+ }
48+ }
49 /* Now let's fdatasync() for the new file */
50 { glnx_fd_close int new_config_fd = open (gs_file_get_path_cached (new_config_path), O_RDONLY | O_CLOEXEC);
51 if (new_config_fd < 0)
52--
532.7.4
54