Put more thought into new signaling code

This commit is contained in:
Justine Tunney 2024-09-19 20:13:55 -07:00
parent 6107eb38f9
commit f68fc1f815
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
10 changed files with 127 additions and 51 deletions

View file

@ -323,6 +323,7 @@ textwindows int64_t __proc_search(int pid) {
int64_t handle = 0;
BLOCK_SIGNALS;
__proc_lock();
// TODO(jart): we should increment a reference count when returning
for (e = dll_first(__proc.list); e; e = dll_next(__proc.list, e)) {
if (pid == PROC_CONTAINER(e)->pid) {
handle = PROC_CONTAINER(e)->handle;