1N/A/***********************************************************************
1N/A* *
1N/A* This software is part of the ast package *
1N/A* Copyright (c) 1985-2011 AT&T Intellectual Property *
1N/A* and is licensed under the *
1N/A* Common Public License, Version 1.0 *
1N/A* by AT&T Intellectual Property *
1N/A* *
1N/A* A copy of the License is available at *
1N/A* http://www.opensource.org/licenses/cpl1.0.txt *
1N/A* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
1N/A* *
1N/A* Information and Software Systems Research *
1N/A* AT&T Research *
1N/A* Florham Park NJ *
1N/A* *
1N/A* Glenn Fowler <gsf@research.att.com> *
1N/A* David Korn <dgk@research.att.com> *
1N/A* Phong Vo <kpv@research.att.com> *
1N/A* *
1N/A***********************************************************************/
1N/A#pragma prototyped
1N/A/*
1N/A * ast POSIX wait/exit support
1N/A */
1N/A
1N/A#ifndef _WAIT_H
1N/A#define _WAIT_H
1N/A
1N/A#include <ast.h>
1N/A#include <ast_wait.h>
1N/A
1N/A#if _sys_wait
1N/A#if defined(__STDPP__directive) && defined(__STDPP__hide)
1N/A__STDPP__directive pragma pp:hide wait waitpid
1N/A#else
1N/A#define wait ______wait
1N/A#define waitpid ______waitpid
1N/A#endif
1N/A#include <sys/wait.h>
1N/A#if defined(__STDPP__directive) && defined(__STDPP__hide)
1N/A__STDPP__directive pragma pp:nohide wait waitpid
1N/A#else
1N/A#undef wait
1N/A#undef waitpid
1N/A#endif
1N/A#endif
1N/A
1N/A#ifndef WNOHANG
1N/A#define WNOHANG 1
1N/A#endif
1N/A
1N/A#ifndef WUNTRACED
1N/A#define WUNTRACED 2
1N/A#endif
1N/A
1N/A#if !_ok_wif
1N/A#undef WIFEXITED
1N/A#undef WEXITSTATUS
1N/A#undef WIFSIGNALED
1N/A#undef WTERMSIG
1N/A#undef WIFSTOPPED
1N/A#undef WSTOPSIG
1N/A#undef WTERMCORE
1N/A#endif
1N/A
1N/A#ifndef WIFEXITED
1N/A#define WIFEXITED(x) (!((x)&((1<<(EXIT_BITS-1))-1)))
1N/A#endif
1N/A
1N/A#ifndef WEXITSTATUS
1N/A#define WEXITSTATUS(x) (((x)>>EXIT_BITS)&((1<<EXIT_BITS)-1))
1N/A#endif
1N/A
1N/A#ifndef WIFSIGNALED
1N/A#define WIFSIGNALED(x) (((x)&((1<<(EXIT_BITS-1))-1))!=0)
1N/A#endif
1N/A
1N/A#ifndef WTERMSIG
1N/A#define WTERMSIG(x) ((x)&((1<<(EXIT_BITS-1))-1))
1N/A#endif
1N/A
1N/A#ifndef WIFSTOPPED
1N/A#define WIFSTOPPED(x) (((x)&((1<<EXIT_BITS)-1))==((1<<(EXIT_BITS-1))-1))
1N/A#endif
1N/A
1N/A#ifndef WSTOPSIG
1N/A#define WSTOPSIG(x) WEXITSTATUS(x)
1N/A#endif
1N/A
1N/A#ifndef WTERMCORE
1N/A#define WTERMCORE(x) ((x)&(1<<(EXIT_BITS-1)))
1N/A#endif
1N/A
1N/Aextern pid_t wait(int*);
1N/Aextern pid_t waitpid(pid_t, int*, int);
1N/A
1N/A#endif