Re: [Xen-devel] [PATCH 1/1] tools/ocaml: Dup2 /dev/null to stdin in daemonize()

2019-02-27 Thread Juergen Groß
On 2/27/19 11:46 AM, Andrew Cooper wrote: On 27/02/2019 10:33, Christian Lindig wrote: Don't close stdin in daemonize() but dup2 /dev/null instead. This avoids fd 0 being reused and potentially written to. Signed-off-by: Christian Lindig Possibly worth noting that this fixes a bug whereby /d

Re: [Xen-devel] [PATCH 1/1] tools/ocaml: Dup2 /dev/null to stdin in daemonize()

2019-02-27 Thread Wei Liu
On Wed, Feb 27, 2019 at 10:33:42AM +, Christian Lindig wrote: > Don't close stdin in daemonize() but dup2 /dev/null instead. This avoids > fd 0 being reused and potentially written to. > > Signed-off-by: Christian Lindig Acked-by: Wei Liu ___ Xen

Re: [Xen-devel] [PATCH 1/1] tools/ocaml: Dup2 /dev/null to stdin in daemonize()

2019-02-27 Thread Andrew Cooper
On 27/02/2019 10:33, Christian Lindig wrote: > Don't close stdin in daemonize() but dup2 /dev/null instead. This avoids > fd 0 being reused and potentially written to. > > Signed-off-by: Christian Lindig Possibly worth noting that this fixes a bug whereby /dev/xen/evtchn reliably gets opened on f

[Xen-devel] [PATCH 1/1] tools/ocaml: Dup2 /dev/null to stdin in daemonize()

2019-02-27 Thread Christian Lindig
Don't close stdin in daemonize() but dup2 /dev/null instead. This avoids fd 0 being reused and potentially written to. Signed-off-by: Christian Lindig --- tools/ocaml/xenstored/stdext.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/ocaml/xenstored/stdext.ml b/too