eventscript: clean up forked handler event code
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 24 Nov 2009 00:30:13 +0000 (11:00 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 24 Nov 2009 00:30:13 +0000 (11:00 +1030)
commitc715746c2f40eb9b21dbf011d16f1f1b0b53fdf9
tree4d4e5878c86287d8c2724cc973fa7f62ba7d391e
parentc5f798116bf3b7954e23c7267b056ee1f5560f45
eventscript: clean up forked handler event code

Write the whole int through the pipe, rather than quietly cutting it
off.  Also, use -2 as the result if the read fails; -1 comes from many
paths if the child fails before running the script.

Add a comment about why we don't need to check the write.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
server/eventscript.c