LibC: Move wait-related stuff to <sys/wait.h>. #POSIX
This commit is contained in:
parent
ed58abb911
commit
07c3cc01ec
Notes:
sideshowbarker
2024-07-19 13:50:17 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/07c3cc01ec5
4 changed files with 34 additions and 27 deletions
|
@ -1,19 +1,20 @@
|
|||
#include <stdlib.h>
|
||||
#include <sys/mman.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <alloca.h>
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <ctype.h>
|
||||
#include <signal.h>
|
||||
#include <AK/AKString.h>
|
||||
#include <AK/Assertions.h>
|
||||
#include <AK/HashMap.h>
|
||||
#include <AK/StdLibExtras.h>
|
||||
#include <AK/Types.h>
|
||||
#include <Kernel/Syscall.h>
|
||||
#include <AK/StdLibExtras.h>
|
||||
#include <AK/HashMap.h>
|
||||
#include <AK/AKString.h>
|
||||
#include <alloca.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
|
|
@ -5,7 +5,17 @@
|
|||
|
||||
__BEGIN_DECLS
|
||||
|
||||
#define WEXITSTATUS(status) (((status)&0xff00) >> 8)
|
||||
#define WTERMSIG(status) ((status)&0x7f)
|
||||
#define WIFEXITED(status) (WTERMSIG(status) == 0)
|
||||
#define WIFSIGNALED(status) (((char)(((status)&0x7f) + 1) >> 1) > 0)
|
||||
|
||||
#define WNOHANG 1
|
||||
#define WUNTRACED 2
|
||||
#define WSTOPPED WUNTRACED
|
||||
#define WEXITED 4
|
||||
#define WCONTINUED 8
|
||||
|
||||
pid_t wait(int* wstatus);
|
||||
|
||||
__END_DECLS
|
||||
|
|
|
@ -95,11 +95,6 @@ enum
|
|||
_PC_NAME_MAX,
|
||||
};
|
||||
|
||||
#define WEXITSTATUS(status) (((status)&0xff00) >> 8)
|
||||
#define WTERMSIG(status) ((status)&0x7f)
|
||||
#define WIFEXITED(status) (WTERMSIG(status) == 0)
|
||||
#define WIFSIGNALED(status) (((char)(((status)&0x7f) + 1) >> 1) > 0)
|
||||
|
||||
#define HOST_NAME_MAX 64
|
||||
|
||||
#define R_OK 4
|
||||
|
|
|
@ -1,21 +1,22 @@
|
|||
#include "GlobalState.h"
|
||||
#include "LineEditor.h"
|
||||
#include "Parser.h"
|
||||
#include <AK/FileSystemPath.h>
|
||||
#include <LibCore/CDirIterator.h>
|
||||
#include <LibCore/CElapsedTimer.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <pwd.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <termios.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/utsname.h>
|
||||
#include <AK/FileSystemPath.h>
|
||||
#include <LibCore/CElapsedTimer.h>
|
||||
#include <LibCore/CDirIterator.h>
|
||||
#include "GlobalState.h"
|
||||
#include "Parser.h"
|
||||
#include "LineEditor.h"
|
||||
#include <sys/wait.h>
|
||||
#include <termios.h>
|
||||
#include <unistd.h>
|
||||
|
||||
//#define SH_DEBUG
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue