Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/heimdall

examples/union-cc/c/parent.c

/* SPDX-License-Identifier: AGPL-3.0-only */
/* The C half of union-cc: the parent's process id (getppid), a call only C makes here, and
 * the process's nice value (getpriority), a call only C makes that the corpus never runs:
 * only the C half or the binary half of the graph can put it in the filter. */
#include <sys/resource.h>
#include <unistd.h>

long union_cc_parent(void) { return (long)getppid(); }

long union_cc_priority(void) { return (long)getpriority(PRIO_PROCESS, 0); }