14887Schin 24887Schin /* : : generated by proto : : */ 34887Schin /*********************************************************************** 44887Schin * * 54887Schin * This software is part of the ast package * 6*12068SRoger.Faulkner@Oracle.COM * Copyright (c) 1985-2010 AT&T Intellectual Property * 74887Schin * and is licensed under the * 84887Schin * Common Public License, Version 1.0 * 98462SApril.Chin@Sun.COM * by AT&T Intellectual Property * 104887Schin * * 114887Schin * A copy of the License is available at * 124887Schin * http://www.opensource.org/licenses/cpl1.0.txt * 134887Schin * (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) * 144887Schin * * 154887Schin * Information and Software Systems Research * 164887Schin * AT&T Research * 174887Schin * Florham Park NJ * 184887Schin * * 194887Schin * Glenn Fowler <gsf@research.att.com> * 204887Schin * David Korn <dgk@research.att.com> * 214887Schin * Phong Vo <kpv@research.att.com> * 224887Schin * * 234887Schin ***********************************************************************/ 244887Schin 254887Schin /* 264887Schin * ast POSIX wait/exit support 274887Schin */ 284887Schin 294887Schin #ifndef _WAIT_H 304887Schin #if !defined(__PROTO__) 314887Schin #include <prototyped.h> 324887Schin #endif 334887Schin #if !defined(__LINKAGE__) 344887Schin #define __LINKAGE__ /* 2004-08-11 transition */ 354887Schin #endif 364887Schin 374887Schin #define _WAIT_H 384887Schin 394887Schin #include <ast.h> 404887Schin #include <ast_wait.h> 414887Schin 424887Schin #if _sys_wait 434887Schin #if defined(__STDPP__directive) && defined(__STDPP__hide) 444887Schin __STDPP__directive pragma pp:hide wait waitpid 454887Schin #else 464887Schin #define wait ______wait 474887Schin #define waitpid ______waitpid 484887Schin #endif 494887Schin #include <sys/wait.h> 504887Schin #if defined(__STDPP__directive) && defined(__STDPP__hide) 514887Schin __STDPP__directive pragma pp:nohide wait waitpid 524887Schin #else 534887Schin #undef wait 544887Schin #undef waitpid 554887Schin #endif 564887Schin #endif 574887Schin 584887Schin #ifndef WNOHANG 594887Schin #define WNOHANG 1 604887Schin #endif 614887Schin 624887Schin #ifndef WUNTRACED 634887Schin #define WUNTRACED 2 644887Schin #endif 654887Schin 664887Schin #if !_ok_wif 674887Schin #undef WIFEXITED 684887Schin #undef WEXITSTATUS 694887Schin #undef WIFSIGNALED 704887Schin #undef WTERMSIG 714887Schin #undef WIFSTOPPED 724887Schin #undef WSTOPSIG 734887Schin #undef WTERMCORE 744887Schin #endif 754887Schin 764887Schin #ifndef WIFEXITED 774887Schin #define WIFEXITED(x) (!((x)&((1<<(EXIT_BITS-1))-1))) 784887Schin #endif 794887Schin 804887Schin #ifndef WEXITSTATUS 814887Schin #define WEXITSTATUS(x) (((x)>>EXIT_BITS)&((1<<EXIT_BITS)-1)) 824887Schin #endif 834887Schin 844887Schin #ifndef WIFSIGNALED 854887Schin #define WIFSIGNALED(x) (((x)&((1<<(EXIT_BITS-1))-1))!=0) 864887Schin #endif 874887Schin 884887Schin #ifndef WTERMSIG 894887Schin #define WTERMSIG(x) ((x)&((1<<(EXIT_BITS-1))-1)) 904887Schin #endif 914887Schin 924887Schin #ifndef WIFSTOPPED 934887Schin #define WIFSTOPPED(x) (((x)&((1<<EXIT_BITS)-1))==((1<<(EXIT_BITS-1))-1)) 944887Schin #endif 954887Schin 964887Schin #ifndef WSTOPSIG 974887Schin #define WSTOPSIG(x) WEXITSTATUS(x) 984887Schin #endif 994887Schin 1004887Schin #ifndef WTERMCORE 1014887Schin #define WTERMCORE(x) ((x)&(1<<(EXIT_BITS-1))) 1024887Schin #endif 1034887Schin 1044887Schin extern __MANGLE__ pid_t wait __PROTO__((int*)); 1054887Schin extern __MANGLE__ pid_t waitpid __PROTO__((pid_t, int*, int)); 1064887Schin 1074887Schin #endif 108