| 782 | the process table the first time it's called. */ |
| 783 | |
| 784 | static void |
| 785 | register_proc (struct tempnode *temp) |
| 786 | { |
| 787 | if (! proctab) |
| 788 | { |
| 789 | proctab = hash_initialize (INIT_PROCTAB_SIZE, NULL, |
| 790 | proctab_hasher, |
| 791 | proctab_comparator, |
| 792 | NULL); |
| 793 | if (! proctab) |
| 794 | xalloc_die (); |
| 795 | } |
| 796 | |
| 797 | temp->state = UNREAPED; |
| 798 | |
| 799 | if (! hash_insert (proctab, temp)) |
| 800 | xalloc_die (); |
| 801 | } |
| 802 | |
| 803 | /* If PID is in the process table, remove it and return true. |
| 804 | Otherwise, return false. */ |
no test coverage detected