Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/sys
File: wait.h
/* Copyright (C) 1991-2018 Free Software Foundation, Inc.
[0] Fix | Delete
This file is part of the GNU C Library.
[1] Fix | Delete
[2] Fix | Delete
The GNU C Library is free software; you can redistribute it and/or
[3] Fix | Delete
modify it under the terms of the GNU Lesser General Public
[4] Fix | Delete
License as published by the Free Software Foundation; either
[5] Fix | Delete
version 2.1 of the License, or (at your option) any later version.
[6] Fix | Delete
[7] Fix | Delete
The GNU C Library is distributed in the hope that it will be useful,
[8] Fix | Delete
but WITHOUT ANY WARRANTY; without even the implied warranty of
[9] Fix | Delete
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
[10] Fix | Delete
Lesser General Public License for more details.
[11] Fix | Delete
[12] Fix | Delete
You should have received a copy of the GNU Lesser General Public
[13] Fix | Delete
License along with the GNU C Library; if not, see
[14] Fix | Delete
<http://www.gnu.org/licenses/>. */
[15] Fix | Delete
[16] Fix | Delete
/*
[17] Fix | Delete
* POSIX Standard: 3.2.1 Wait for Process Termination <sys/wait.h>
[18] Fix | Delete
*/
[19] Fix | Delete
[20] Fix | Delete
#ifndef _SYS_WAIT_H
[21] Fix | Delete
#define _SYS_WAIT_H 1
[22] Fix | Delete
[23] Fix | Delete
#include <features.h>
[24] Fix | Delete
[25] Fix | Delete
__BEGIN_DECLS
[26] Fix | Delete
[27] Fix | Delete
#include <bits/types.h>
[28] Fix | Delete
#ifndef __pid_t_defined
[29] Fix | Delete
typedef __pid_t pid_t;
[30] Fix | Delete
# define __pid_t_defined
[31] Fix | Delete
#endif
[32] Fix | Delete
[33] Fix | Delete
#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
[34] Fix | Delete
# include <signal.h>
[35] Fix | Delete
#endif
[36] Fix | Delete
[37] Fix | Delete
#if defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8
[38] Fix | Delete
/* Some older standards require the contents of struct rusage to be
[39] Fix | Delete
defined here. */
[40] Fix | Delete
# include <bits/types/struct_rusage.h>
[41] Fix | Delete
#endif
[42] Fix | Delete
[43] Fix | Delete
/* These macros could also be defined in <stdlib.h>. */
[44] Fix | Delete
#if !defined _STDLIB_H || (!defined __USE_XOPEN && !defined __USE_XOPEN2K8)
[45] Fix | Delete
/* This will define the `W*' macros for the flag
[46] Fix | Delete
bits to `waitpid', `wait3', and `wait4'. */
[47] Fix | Delete
# include <bits/waitflags.h>
[48] Fix | Delete
[49] Fix | Delete
/* This will define all the `__W*' macros. */
[50] Fix | Delete
# include <bits/waitstatus.h>
[51] Fix | Delete
[52] Fix | Delete
# define WEXITSTATUS(status) __WEXITSTATUS (status)
[53] Fix | Delete
# define WTERMSIG(status) __WTERMSIG (status)
[54] Fix | Delete
# define WSTOPSIG(status) __WSTOPSIG (status)
[55] Fix | Delete
# define WIFEXITED(status) __WIFEXITED (status)
[56] Fix | Delete
# define WIFSIGNALED(status) __WIFSIGNALED (status)
[57] Fix | Delete
# define WIFSTOPPED(status) __WIFSTOPPED (status)
[58] Fix | Delete
# ifdef __WIFCONTINUED
[59] Fix | Delete
# define WIFCONTINUED(status) __WIFCONTINUED (status)
[60] Fix | Delete
# endif
[61] Fix | Delete
#endif /* <stdlib.h> not included. */
[62] Fix | Delete
[63] Fix | Delete
#ifdef __USE_MISC
[64] Fix | Delete
# define WCOREFLAG __WCOREFLAG
[65] Fix | Delete
# define WCOREDUMP(status) __WCOREDUMP (status)
[66] Fix | Delete
# define W_EXITCODE(ret, sig) __W_EXITCODE (ret, sig)
[67] Fix | Delete
# define W_STOPCODE(sig) __W_STOPCODE (sig)
[68] Fix | Delete
#endif
[69] Fix | Delete
[70] Fix | Delete
/* The following values are used by the `waitid' function. */
[71] Fix | Delete
#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
[72] Fix | Delete
typedef enum
[73] Fix | Delete
{
[74] Fix | Delete
P_ALL, /* Wait for any child. */
[75] Fix | Delete
P_PID, /* Wait for specified process. */
[76] Fix | Delete
P_PGID /* Wait for members of process group. */
[77] Fix | Delete
} idtype_t;
[78] Fix | Delete
#endif
[79] Fix | Delete
[80] Fix | Delete
[81] Fix | Delete
/* Wait for a child to die. When one does, put its status in *STAT_LOC
[82] Fix | Delete
and return its process ID. For errors, return (pid_t) -1.
[83] Fix | Delete
[84] Fix | Delete
This function is a cancellation point and therefore not marked with
[85] Fix | Delete
__THROW. */
[86] Fix | Delete
extern __pid_t wait (int *__stat_loc);
[87] Fix | Delete
[88] Fix | Delete
#ifdef __USE_MISC
[89] Fix | Delete
/* Special values for the PID argument to `waitpid' and `wait4'. */
[90] Fix | Delete
# define WAIT_ANY (-1) /* Any process. */
[91] Fix | Delete
# define WAIT_MYPGRP 0 /* Any process in my process group. */
[92] Fix | Delete
#endif
[93] Fix | Delete
[94] Fix | Delete
/* Wait for a child matching PID to die.
[95] Fix | Delete
If PID is greater than 0, match any process whose process ID is PID.
[96] Fix | Delete
If PID is (pid_t) -1, match any process.
[97] Fix | Delete
If PID is (pid_t) 0, match any process with the
[98] Fix | Delete
same process group as the current process.
[99] Fix | Delete
If PID is less than -1, match any process whose
[100] Fix | Delete
process group is the absolute value of PID.
[101] Fix | Delete
If the WNOHANG bit is set in OPTIONS, and that child
[102] Fix | Delete
is not already dead, return (pid_t) 0. If successful,
[103] Fix | Delete
return PID and store the dead child's status in STAT_LOC.
[104] Fix | Delete
Return (pid_t) -1 for errors. If the WUNTRACED bit is
[105] Fix | Delete
set in OPTIONS, return status for stopped children; otherwise don't.
[106] Fix | Delete
[107] Fix | Delete
This function is a cancellation point and therefore not marked with
[108] Fix | Delete
__THROW. */
[109] Fix | Delete
extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options);
[110] Fix | Delete
[111] Fix | Delete
#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
[112] Fix | Delete
# ifndef __id_t_defined
[113] Fix | Delete
typedef __id_t id_t;
[114] Fix | Delete
# define __id_t_defined
[115] Fix | Delete
# endif
[116] Fix | Delete
[117] Fix | Delete
# include <bits/types/siginfo_t.h>
[118] Fix | Delete
[119] Fix | Delete
/* Wait for a childing matching IDTYPE and ID to change the status and
[120] Fix | Delete
place appropriate information in *INFOP.
[121] Fix | Delete
If IDTYPE is P_PID, match any process whose process ID is ID.
[122] Fix | Delete
If IDTYPE is P_PGID, match any process whose process group is ID.
[123] Fix | Delete
If IDTYPE is P_ALL, match any process.
[124] Fix | Delete
If the WNOHANG bit is set in OPTIONS, and that child
[125] Fix | Delete
is not already dead, clear *INFOP and return 0. If successful, store
[126] Fix | Delete
exit code and status in *INFOP.
[127] Fix | Delete
[128] Fix | Delete
This function is a cancellation point and therefore not marked with
[129] Fix | Delete
__THROW. */
[130] Fix | Delete
extern int waitid (idtype_t __idtype, __id_t __id, siginfo_t *__infop,
[131] Fix | Delete
int __options);
[132] Fix | Delete
#endif
[133] Fix | Delete
[134] Fix | Delete
#if defined __USE_MISC \
[135] Fix | Delete
|| (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K)
[136] Fix | Delete
/* This being here makes the prototypes valid whether or not
[137] Fix | Delete
we have already included <sys/resource.h> to define `struct rusage'. */
[138] Fix | Delete
struct rusage;
[139] Fix | Delete
[140] Fix | Delete
/* Wait for a child to exit. When one does, put its status in *STAT_LOC and
[141] Fix | Delete
return its process ID. For errors return (pid_t) -1. If USAGE is not
[142] Fix | Delete
nil, store information about the child's resource usage there. If the
[143] Fix | Delete
WUNTRACED bit is set in OPTIONS, return status for stopped children;
[144] Fix | Delete
otherwise don't. */
[145] Fix | Delete
extern __pid_t wait3 (int *__stat_loc, int __options,
[146] Fix | Delete
struct rusage * __usage) __THROWNL;
[147] Fix | Delete
#endif
[148] Fix | Delete
[149] Fix | Delete
#ifdef __USE_MISC
[150] Fix | Delete
/* PID is like waitpid. Other args are like wait3. */
[151] Fix | Delete
extern __pid_t wait4 (__pid_t __pid, int *__stat_loc, int __options,
[152] Fix | Delete
struct rusage *__usage) __THROWNL;
[153] Fix | Delete
#endif /* Use misc. */
[154] Fix | Delete
[155] Fix | Delete
[156] Fix | Delete
__END_DECLS
[157] Fix | Delete
[158] Fix | Delete
#endif /* sys/wait.h */
[159] Fix | Delete
[160] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function