Linux cat 命令源码剖析(二)

2014-11-23 17:45:12 · 作者: · 浏览: 90
hat 0 < n_read. */
size_t n = n_read;


/* full_write 和 safe_read都调用的是 safe_sw, 用宏实现的,
* 查看 safe_write.c 就可以发现其实现的关键.
*/
if (full_write (STDOUT_FILENO, buf, n) != n)
error (EXIT_FAILURE, errno, _("write error"));
}
}
}