diff options
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r-- | meta/recipes-devtools/pseudo/files/shutdownping.patch | 53 | ||||
-rw-r--r-- | meta/recipes-devtools/pseudo/pseudo_1.5.1.bb | 1 |
2 files changed, 54 insertions, 0 deletions
diff --git a/meta/recipes-devtools/pseudo/files/shutdownping.patch b/meta/recipes-devtools/pseudo/files/shutdownping.patch new file mode 100644 index 0000000000..8af8e0b594 --- /dev/null +++ b/meta/recipes-devtools/pseudo/files/shutdownping.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | There is a potential issue with the fastop code in pseudo since a process may | ||
2 | exit and allow some other function to run before the server has processed | ||
3 | the commands run by the process. Issues have been see with unpredictable | ||
4 | file permissions. | ||
5 | |||
6 | To avoid this, we ping the server before exitting which guarantees it has | ||
7 | processed the current command queue. | ||
8 | |||
9 | Debugged-by: RP | ||
10 | Fix written by peter.seebach@windriver.com | ||
11 | |||
12 | Upstream-Status: Submitted | ||
13 | |||
14 | [YOCTO #5132] | ||
15 | |||
16 | diff --git a/pseudo_client.c b/pseudo_client.c | ||
17 | index f58ce4c..20943b6 100644 | ||
18 | --- a/pseudo_client.c | ||
19 | +++ b/pseudo_client.c | ||
20 | @@ -75,6 +75,9 @@ static int nfds = 0; | ||
21 | static int messages = 0; | ||
22 | static struct timeval message_time = { .tv_sec = 0 }; | ||
23 | static int pseudo_inited = 0; | ||
24 | + | ||
25 | +static int sent_messages = 0; | ||
26 | + | ||
27 | int pseudo_nosymlinkexp = 0; | ||
28 | |||
29 | /* note: these are int, not uid_t/gid_t, so I can use 'em with scanf */ | ||
30 | @@ -711,6 +714,11 @@ client_ping(void) { | ||
31 | return 0; | ||
32 | } | ||
33 | |||
34 | +static void | ||
35 | +void_client_ping(void) { | ||
36 | + client_ping(); | ||
37 | +} | ||
38 | + | ||
39 | int | ||
40 | pseudo_fd(int fd, int how) { | ||
41 | int newfd; | ||
42 | @@ -1043,6 +1051,11 @@ pseudo_client_op(pseudo_op_t op, int access, int fd, int dirfd, const char *path | ||
43 | /* disable wrappers */ | ||
44 | pseudo_antimagic(); | ||
45 | |||
46 | + if (!sent_messages) { | ||
47 | + sent_messages = 1; | ||
48 | + atexit(void_client_ping); | ||
49 | + } | ||
50 | + | ||
51 | if (op == OP_RENAME) { | ||
52 | va_list ap; | ||
53 | va_start(ap, buf); | ||
diff --git a/meta/recipes-devtools/pseudo/pseudo_1.5.1.bb b/meta/recipes-devtools/pseudo/pseudo_1.5.1.bb index c5df919586..bc928569df 100644 --- a/meta/recipes-devtools/pseudo/pseudo_1.5.1.bb +++ b/meta/recipes-devtools/pseudo/pseudo_1.5.1.bb | |||
@@ -5,6 +5,7 @@ PR = "r4" | |||
5 | SRC_URI = " \ | 5 | SRC_URI = " \ |
6 | http://www.yoctoproject.org/downloads/${BPN}/${BPN}-${PV}.tar.bz2 \ | 6 | http://www.yoctoproject.org/downloads/${BPN}/${BPN}-${PV}.tar.bz2 \ |
7 | file://0001-pseudo_has_unload-add-function.patch \ | 7 | file://0001-pseudo_has_unload-add-function.patch \ |
8 | file://shutdownping.patch \ | ||
8 | " | 9 | " |
9 | 10 | ||
10 | SRC_URI[md5sum] = "5ec67c7bff5fe68c56de500859c19172" | 11 | SRC_URI[md5sum] = "5ec67c7bff5fe68c56de500859c19172" |