diff options
| author | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-08-01 09:04:20 +0100 |
|---|---|---|
| committer | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-08-01 09:04:20 +0100 |
| commit | 4eb73854d70f5fd252bb6b17b26a58ac3bfff6a4 (patch) | |
| tree | f4d3ce2123fc250e3eb0b255e09857d4dc6a43c3 /tools/ioemu/readline.c | |
| parent | a0bc2a22180ce4cfa6131116d4d1ccf51e0dbbcc (diff) | |
| download | xen-4eb73854d70f5fd252bb6b17b26a58ac3bfff6a4.tar.gz xen-4eb73854d70f5fd252bb6b17b26a58ac3bfff6a4.tar.bz2 xen-4eb73854d70f5fd252bb6b17b26a58ac3bfff6a4.zip | |
Fix file descriptor leak in blktapctrl
The blktapctrl process is responsible for spawning individual tapdisk
processes. It does this using the 'system' method, but unfortunately
none of its file descriptors have the close-on-exec flag set. The
parent blktapctl process opens a couple of unix domain sockets
per-tapdisk it spawns. So the first tapdisk get 2 FDs leaked to it,
the second gets 4 FDs leaked to it, the 3rd gets 6 and so on. The use
of 'system' also unneccessarily invokes the shell.
Replace system with fork/execvp, and explicitly close all file handles
up to _SC_OPEN_MAX.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'tools/ioemu/readline.c')
0 files changed, 0 insertions, 0 deletions
