Is closing a file descriptor and removing unnecessary hours really necessary?

With python inotifyx, do I need to remove the clock and close the open system file descriptor, if I need them before the program exits? For instance. Are there any possible problems if I create one (file descriptor + clock) with each run and do not close it?

+3
source share
2 answers

The kernel stores the clock as full paths, so closing the clock is preferable, and unnecessary VFS work is also required. As for the file descriptor, it will depend on how many others you have opened.

, , , , . , .

0

(, , , waitpid (2) ..), . , , - .

+1

Source: https://habr.com/ru/post/1735890/


All Articles