x11: dup
fd before passing to shm_attach_fd
#170
Merged
dup
fd before passing to shm_attach_fd
#170