diff options
Diffstat (limited to 'meta/recipes-devtools/pseudo/files/shutdownping.patch')
| -rw-r--r-- | meta/recipes-devtools/pseudo/files/shutdownping.patch | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/meta/recipes-devtools/pseudo/files/shutdownping.patch b/meta/recipes-devtools/pseudo/files/shutdownping.patch deleted file mode 100644 index 8af8e0b594..0000000000 --- a/meta/recipes-devtools/pseudo/files/shutdownping.patch +++ /dev/null | |||
| @@ -1,53 +0,0 @@ | |||
| 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); | ||
