diff options
Diffstat (limited to 'meta/recipes-devtools/pseudo')
| -rw-r--r-- | meta/recipes-devtools/pseudo/files/0001-Don-t-send-SIGUSR1-to-init.patch | 48 | ||||
| -rw-r--r-- | meta/recipes-devtools/pseudo/pseudo_1.8.1.bb | 1 | ||||
| -rw-r--r-- | meta/recipes-devtools/pseudo/pseudo_git.bb | 2 |
3 files changed, 50 insertions, 1 deletions
diff --git a/meta/recipes-devtools/pseudo/files/0001-Don-t-send-SIGUSR1-to-init.patch b/meta/recipes-devtools/pseudo/files/0001-Don-t-send-SIGUSR1-to-init.patch new file mode 100644 index 0000000000..6c694ceb0d --- /dev/null +++ b/meta/recipes-devtools/pseudo/files/0001-Don-t-send-SIGUSR1-to-init.patch | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | From befc6dbd6469d428c9e0830dbe51bdf7ac39d9ae Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Seebs <seebs@seebs.net> | ||
| 3 | Date: Thu, 22 Sep 2016 14:35:04 -0500 | ||
| 4 | Subject: [PATCH] Don't send SIGUSR1 to init. | ||
| 5 | |||
| 6 | If the parent exits due to child process being slow, getppid() will return | ||
| 7 | 1, and we'll send SIGUSR1 to init, which can break things like dumbinit | ||
| 8 | which aren't adequately protected against non-root processes sending them | ||
| 9 | signals. | ||
| 10 | |||
| 11 | Signed-off-by: Seebs <seebs@seebs.net> | ||
| 12 | |||
| 13 | Upstream-Status: Backport (commit befc6dbd6469d428c9e0830dbe51bdf7ac39d9ae) | ||
| 14 | |||
| 15 | [YOCTO #10324] | ||
| 16 | |||
| 17 | This resolves an issue where a docker container running builds would die | ||
| 18 | due to it's 'mini init' being signaled by pseudo. | ||
| 19 | |||
| 20 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
| 21 | --- | ||
| 22 | pseudo_server.c | 11 ++++++++--- | ||
| 23 | |||
| 24 | diff --git a/pseudo_server.c b/pseudo_server.c | ||
| 25 | index 65102dd..8731d20 100644 | ||
| 26 | --- a/pseudo_server.c | ||
| 27 | +++ b/pseudo_server.c | ||
| 28 | @@ -358,9 +358,14 @@ pseudo_server_start(int daemonize) { | ||
| 29 | signal(SIGTERM, quit_now); | ||
| 30 | /* tell parent process to stop waiting */ | ||
| 31 | if (daemonize) { | ||
| 32 | - pseudo_diag("Setup complete, sending SIGUSR1 to pid %d.\n", | ||
| 33 | - getppid()); | ||
| 34 | - kill(getppid(), SIGUSR1); | ||
| 35 | + pid_t ppid = getppid(); | ||
| 36 | + if (ppid == 1) { | ||
| 37 | + pseudo_diag("Setup complete, but parent is init, not sending SIGUSR1.\n"); | ||
| 38 | + } else { | ||
| 39 | + pseudo_diag("Setup complete, sending SIGUSR1 to pid %d.\n", | ||
| 40 | + ppid); | ||
| 41 | + kill(ppid, SIGUSR1); | ||
| 42 | + } | ||
| 43 | } | ||
| 44 | pseudo_server_loop(); | ||
| 45 | return 0; | ||
| 46 | -- | ||
| 47 | 2.5.5 | ||
| 48 | |||
diff --git a/meta/recipes-devtools/pseudo/pseudo_1.8.1.bb b/meta/recipes-devtools/pseudo/pseudo_1.8.1.bb index f45912a711..cec214986e 100644 --- a/meta/recipes-devtools/pseudo/pseudo_1.8.1.bb +++ b/meta/recipes-devtools/pseudo/pseudo_1.8.1.bb | |||
| @@ -6,6 +6,7 @@ SRC_URI = "http://downloads.yoctoproject.org/releases/pseudo/${BPN}-${PV}.tar.bz | |||
| 6 | file://fallback-group \ | 6 | file://fallback-group \ |
| 7 | file://moreretries.patch \ | 7 | file://moreretries.patch \ |
| 8 | file://Fix-xattr-performance.patch \ | 8 | file://Fix-xattr-performance.patch \ |
| 9 | file://0001-Don-t-send-SIGUSR1-to-init.patch \ | ||
| 9 | " | 10 | " |
| 10 | 11 | ||
| 11 | SRC_URI[md5sum] = "ee38e4fb62ff88ad067b1a5a3825bac7" | 12 | SRC_URI[md5sum] = "ee38e4fb62ff88ad067b1a5a3825bac7" |
diff --git a/meta/recipes-devtools/pseudo/pseudo_git.bb b/meta/recipes-devtools/pseudo/pseudo_git.bb index 8735cf405a..8110b1a193 100644 --- a/meta/recipes-devtools/pseudo/pseudo_git.bb +++ b/meta/recipes-devtools/pseudo/pseudo_git.bb | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | require pseudo.inc | 1 | require pseudo.inc |
| 2 | 2 | ||
| 3 | SRCREV = "f4b1c752186f4d08f1fadb0ea10ebcde9b0ea251" | 3 | SRCREV = "befc6dbd6469d428c9e0830dbe51bdf7ac39d9ae" |
| 4 | PV = "1.8.1+git${SRCPV}" | 4 | PV = "1.8.1+git${SRCPV}" |
| 5 | 5 | ||
| 6 | DEFAULT_PREFERENCE = "-1" | 6 | DEFAULT_PREFERENCE = "-1" |
