Plan 9 from Bell Labs’s /usr/web/sources/patch/maybe/ndebug-q/readme

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


If a process receives a user note posted from /proc/#/note shortly before
itself causes a trap, the trap (NDebug) note gets enqueued in the proc->note
array *after* the NUser note and the NUser note gets dequeued and handled
while the NDebug is pending. The next switch to kernel (while handling the
NUser note) detects the pending NDebug and kills the proc.

This patch makes sure the NDebug note gets put in the first slot of the proc->note
array giving the user note handler a chance to handle it.

This doesnt change any behavior from the manpage. The process still gets
killed when trapping while in the note handler.


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.