set closeExec flags in get_device_once
Merge pull request #7 from msabdeljalil/fix_closeExec_flags

set closeExec flags in get_device_once