b923802113
Replace an oft-duplicated pattern with a trivial helper function. In doing so, we observe that the one special case (displayfd 'didn't need to be CLOEXEC') was wrong, because the X server does fork itself internally, so there is nothing wrong with setting CLOEXEC. Signed-off-by: Daniel Stone <daniels@collabora.com>