Michal Privoznik 432faf259b virCommand: use procfs to learn opened FDs
When spawning a child process, between fork() and exec() we close
all file descriptors and keep only those the caller wants us to
pass onto the child. The problem is how we do that. Currently, we
get the limit of opened files and then iterate through each one
of them and either close() it or make it survive exec(). This
approach is suboptimal (although, not that much in default
configurations where the limit is pretty low - 1024). We have
/proc where we can learn what FDs we hold open and thus we can
selectively close only those.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-07-16 13:47:49 +02:00
..
2019-07-09 10:27:20 +02:00
2019-06-19 17:12:31 +02:00
2019-06-19 17:12:31 +02:00
2019-06-04 09:29:35 +02:00
2019-06-03 18:07:16 +02:00
2019-06-20 10:29:54 +02:00