There is no special function to remove FD from watch. When I closed stream added to be watch, my script hanged.
<?php newt_form_watch_fd($form, $old_fd, 0); ?> seems to be solution of this issue.
PHP - Manual: newt_form_watch_fd
2025-03-13
(PECL newt >= 0.1)
newt_form_watch_fd —
$form
, resource $stream
[, int $flags
] ) : void本函数还未编写文档,仅有参数列表。
form
stream
flags
没有返回值。
There is no special function to remove FD from watch. When I closed stream added to be watch, my script hanged.
<?php newt_form_watch_fd($form, $old_fd, 0); ?> seems to be solution of this issue.
官方地址:https://www.php.net/manual/en/function.newt-form-watch-fd.php