in fdopen, avoid setting O_APPEND flag if it's already set
this saves a syscall in the case where the underlying open already took place with O_APPEND, which is common because fopen with append modes sets O_APPEND at the time of open before passing the file descriptor to __fdopen.
Showing
想要评论请 注册 或 登录