diff options
Diffstat (limited to 'meta/recipes-devtools/pseudo/files/0001-Quiet-diagnostics-during-startup-for-pseudo-d.patch')
-rw-r--r-- | meta/recipes-devtools/pseudo/files/0001-Quiet-diagnostics-during-startup-for-pseudo-d.patch | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/meta/recipes-devtools/pseudo/files/0001-Quiet-diagnostics-during-startup-for-pseudo-d.patch b/meta/recipes-devtools/pseudo/files/0001-Quiet-diagnostics-during-startup-for-pseudo-d.patch new file mode 100644 index 0000000000..d4b9f6a0f8 --- /dev/null +++ b/meta/recipes-devtools/pseudo/files/0001-Quiet-diagnostics-during-startup-for-pseudo-d.patch | |||
@@ -0,0 +1,54 @@ | |||
1 | From eead8a505245a292c43f070c0e836cdfeb7bd7bd Mon Sep 17 00:00:00 2001 | ||
2 | From: Seebs <seebs@seebs.net> | ||
3 | Date: Wed, 28 Sep 2016 17:05:17 -0500 | ||
4 | Subject: [PATCH 1/2] Quiet diagnostics during startup for pseudo -d | ||
5 | |||
6 | When the client spawns a pseudo server, it starts out sending diagnostics | ||
7 | to stderr. This can be spammy in some cases with races during startup; | ||
8 | everything resolves, but we get scary-looking diagnostics. So shove | ||
9 | those into a log file. | ||
10 | |||
11 | Signed-off-by: Seebs <seebs@seebs.net> | ||
12 | |||
13 | Upstream-Status: Backport | ||
14 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
15 | --- | ||
16 | ChangeLog.txt | 5 +++++ | ||
17 | pseudo_server.c | 4 +++- | ||
18 | 2 files changed, 8 insertions(+), 1 deletion(-) | ||
19 | |||
20 | diff --git a/ChangeLog.txt b/ChangeLog.txt | ||
21 | index d6359ca..4cc24de 100644 | ||
22 | --- a/ChangeLog.txt | ||
23 | +++ b/ChangeLog.txt | ||
24 | @@ -1,3 +1,8 @@ | ||
25 | +2016-09-28: | ||
26 | + * (seebs) Send errors to log when daemonizing, but do that a lot | ||
27 | + sooner to prevent startup messages which can show up spuriously | ||
28 | + with multiple clients. | ||
29 | + | ||
30 | 2016-07-28: | ||
31 | * (seebs) Fix performance issue on deletion with xattr changes. | ||
32 | |||
33 | diff --git a/pseudo_server.c b/pseudo_server.c | ||
34 | index 8731d20..7c2db2f 100644 | ||
35 | --- a/pseudo_server.c | ||
36 | +++ b/pseudo_server.c | ||
37 | @@ -162,6 +162,9 @@ pseudo_server_start(int daemonize) { | ||
38 | * SIGUSR1, or until too much time has passed. */ | ||
39 | if (daemonize) { | ||
40 | int child; | ||
41 | + | ||
42 | + /* make startup messages go away when invoked-as-daemon */ | ||
43 | + pseudo_debug_logfile(PSEUDO_LOGFILE, 2); | ||
44 | child = fork(); | ||
45 | if (child == -1) { | ||
46 | pseudo_diag("Couldn't fork child process: %s\n", | ||
47 | @@ -231,7 +234,6 @@ pseudo_server_start(int daemonize) { | ||
48 | setsid(); | ||
49 | fclose(stdin); | ||
50 | fclose(stdout); | ||
51 | - pseudo_debug_logfile(PSEUDO_LOGFILE, 2); | ||
52 | /* and then just execute the server code normally. */ | ||
53 | /* Any logging will presumably go to logfile, but | ||
54 | * exit status will make it back to the parent for | ||