From 0cc9b20c15460213e488bf5e70963b941482f628 Mon Sep 17 00:00:00 2001 From: William Harrington Date: Tue, 14 Jan 2025 16:06:02 -0600 Subject: Add source. --- sdk/std/process.h | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 sdk/std/process.h (limited to 'sdk/std/process.h') diff --git a/sdk/std/process.h b/sdk/std/process.h new file mode 100644 index 0000000..2fdf6ae --- /dev/null +++ b/sdk/std/process.h @@ -0,0 +1,99 @@ +/* + * Portable process handling routines. + * $Id$ + * Copyright (c) 1997 by Tycho Softworks. + * For conditions of distribution and reuse see product license. + */ + +#ifndef __STD_PROCESS_H__ +#define __STD_PROCESS_H__ + +#ifndef __STD_TYPES_H__ +#include +#endif + +#ifndef __STD_LIMITS_H__ +#include +#endif + +#ifndef POSIX2_LIM_H_MISSING +#include +#endif + +#ifndef POSIX_OPT_H_MISSING +#include +#endif + +#ifndef UNISTD_H_MISSING +#include +#endif + +#ifndef _SC_OPEN_MAX +#ifndef CONFNAME_H_MISSING +#include +#else +#ifndef SYSCONF_H_MISSING +#include +#endif +#endif +#endif + +#ifndef PROCESS_H_MISSING +#include +#endif + +#ifndef WAIT_H_MISSING +#include +#else +#ifndef SYS_WAIT_H_MISSING +#include +#endif +#endif + +#ifndef ENV_H_MISSING +#include +#endif + +#ifndef SYSEXITS_H_MISSING +#include +#else +#include +#endif + +/* We now re-evaluate system limits using runtime sysconf() values */ + +#ifdef _SC_ARG_MAX +#undef ARG_MAX +#define ARG_MAX (sysconf(_SC_ARG_MAX)) +#endif + +#ifdef _SC_CHILD_MAX +#undef CHILD_MAX +#define CHILD_MAX (sysconf(_SC_CHILD_MAX)) +#endif + +#ifdef _SC_NGROUPS_MAX +#undef NGROUPS_MAX +#define NGROUPS_MAX (sysconf(_SC_NGROUPS_MAX)) +#endif + +#ifdef _SC_OPEN_MAX +#undef OPEN_MAX +#define OPEN_MAX (sysconf(_SC_OPEN_MAX)) +#endif + +#ifdef _SC_STREAM_MAX +#undef STREAM_MAX +#define STREAM_MAX (sysconf(_SC_STREAM_MAX)) +#endif + +#ifdef _SC_TZNAME_MAX +#undef TZNAME_MAX +#define TZNAME_MAX (sysconf(_SC_TZNAME_MAX)) +#endif + +#ifdef PID_T_MISSING +typedef int pid_t; +#endif + +#endif -- cgit v1.2.3-54-g00ecf