MCPcopy Create free account
hub / github.com/coreutils/coreutils / register_proc

Function register_proc

src/sort.c:784–801  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

782 the process table the first time it's called. */
783
784static void
785register_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. */

Callers 2

maybe_create_tempFunction · 0.85
open_tempFunction · 0.85

Calls 1

xalloc_dieFunction · 0.85

Tested by

no test coverage detected