package
Version:
v0.0.18
Opens a new window with list of versions in this module.
Published: Oct 15, 2026
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package procevent는 process 종료와 directory 변경을 운영체제의 알림으로 기다린다. polling과 기한이
없다: 기다림은 알림이 오면 끝난다. darwin은 kqueue, linux는 pidfd와 inotify를 쓴다.
Alive는 pid의 process가 있는지다. 다른 사용자의 process(EPERM)도 있는 것이다.
WatchDir는 inotify에 directory의 변경(entry가 생기거나 없어지거나 옮겨짐)을 등록하고, 다음 변경을
기다리는 함수와 감시를 닫는 함수를 돌려준다. 등록은 상태를 읽기 전에 해서 그 사이의 변경을 놓치지
않는다.
WatchExit는 pid의 pidfd를 열고, process가 끝나 pidfd가 읽을 수 있게 되기를 poll로 기다리는 함수를
돌려준다. 이미 없는 process는 unix.ESRCH다.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.