projects
/
ccan
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
58f929a
)
daemonize: make valgrind happy.
author
Rusty Russell
<rusty@rustcorp.com.au>
Thu, 6 Jan 2011 01:45:03 +0000
(12:15 +1030)
committer
Rusty Russell
<rusty@rustcorp.com.au>
Thu, 6 Jan 2011 01:45:03 +0000
(12:15 +1030)
ccan/daemonize/test/run.c
patch
|
blob
|
history
diff --git
a/ccan/daemonize/test/run.c
b/ccan/daemonize/test/run.c
index a471268d3ef172995fd4a0088cd70c9266c75383..c86f214bcae6e3fcfb2901e436971471e21e2479 100644
(file)
--- a/
ccan/daemonize/test/run.c
+++ b/
ccan/daemonize/test/run.c
@@
-5,6
+5,7
@@
#include <unistd.h>
#include <err.h>
#include <errno.h>
+#include <string.h>
struct child_data {
pid_t pid;
@@
-34,6
+35,8
@@
int main(int argc, char *argv[])
char buffer[2];
pid = getpid();
daemonize();
+ /* Keep valgrind happy about uninitialized bytes. */
+ memset(&daemonized, 0, sizeof(daemonized));
daemonized.pid = getpid();
daemonized.in_root_dir = (getcwd(buffer, 2) != NULL);
daemonized.read_from_stdin