get fd flag first
set fd cloexec flag on /tmp/mirrord