por*_*eux 3 c pthreads chdir
如果我在一个线程中的chdir,那会影响父程序的cwd吗?
Die*_*Epp 8
是.
如果在多线程应用程序中需要相对路径,则最安全的方法是使用at()函数版本.例如,openat()就像open():
at()
openat()
open()
int openat(int dirfd, const char *pathname, int flags);
第一个参数是目录的fd.该路径相对于该目录.
归档时间:
13 年,8 月 前
查看次数:
2090 次
最近记录: