On Fri, 17 Jun 2022, andrey100100...@gmail.com wrote:
Seems like noted() call not needed in user code.
noted() is only needed when using the syscall notify, when using atnotify() (or threadnotify) you don't need it, as it is said in notify(2) and you did correctly in your first example. threadnotify doesn't kill your process if there is no space free in onnote[], onnotepid[], the handler is not registered, that's all. alarm() should send the note to the process and the first handler registered with the note "alarm" should be executed. Your handler checked for the note and returned non zero, the process should continue. When read is interrupted, it should return an error, the process should not be killed. Here is the issue. Comment the read statement and there will be the same number of "end"s as "start"s. Note that you could register the handler in threadmain and avoid completely this issue, but as I said before, something seems wrong to me here. ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/Tfa6823048ad90a21-Madcf140195c52ad821869376 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription