문제

when I do

ls proc/[pid]/fd

sometimes I don't get output, It seems that there are no file descriptor in that file.

What does that mean when a process doesn't have file descriptor?

도움이 되었습니까?

해결책

The process in question is more likely a deamon — daemon processed will intentionally close standard file descriptors in order to avoid hanging onto their resources. (They will also chdir to the root directory, invoke an extra fork() and perform a number of more obscure operations for the same reason.)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top