os.open wrapper prevents opening 'nul' special device
Created originally on Bitbucket by yuja (Yuya Nishihara)
os.open(os.devnull, os.O_RDWR)
fails with the following error.
abort: No such file or directory: '\\?\c:\Documents and Settings\yuya\My Documents\hello\nul'
It prevents running hg serve --cmdserver pipe
of Mercurial 3.3.
http://selenic.com/repo/hg/file/e1dbe0b215ae/mercurial/commandserver.py#l255
Original report: https://bitbucket.org/tortoisehg/thg/issue/4040/