uses /proc/self/fd rather than /dev/fd for native mode