mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibC: Move wait-related stuff to <sys/wait.h>. #POSIX
This commit is contained in:
@@ -1,19 +1,20 @@
|
|||||||
#include <stdlib.h>
|
#include <AK/AKString.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/Assertions.h>
|
#include <AK/Assertions.h>
|
||||||
|
#include <AK/HashMap.h>
|
||||||
|
#include <AK/StdLibExtras.h>
|
||||||
#include <AK/Types.h>
|
#include <AK/Types.h>
|
||||||
#include <Kernel/Syscall.h>
|
#include <Kernel/Syscall.h>
|
||||||
#include <AK/StdLibExtras.h>
|
#include <alloca.h>
|
||||||
#include <AK/HashMap.h>
|
#include <assert.h>
|
||||||
#include <AK/AKString.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" {
|
extern "C" {
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,17 @@
|
|||||||
|
|
||||||
__BEGIN_DECLS
|
__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 WNOHANG 1
|
||||||
|
#define WUNTRACED 2
|
||||||
|
#define WSTOPPED WUNTRACED
|
||||||
|
#define WEXITED 4
|
||||||
|
#define WCONTINUED 8
|
||||||
|
|
||||||
pid_t wait(int* wstatus);
|
pid_t wait(int* wstatus);
|
||||||
|
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|||||||
@@ -95,11 +95,6 @@ enum
|
|||||||
_PC_NAME_MAX,
|
_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 HOST_NAME_MAX 64
|
||||||
|
|
||||||
#define R_OK 4
|
#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 <errno.h>
|
||||||
|
#include <fcntl.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <termios.h>
|
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/utsname.h>
|
#include <sys/utsname.h>
|
||||||
#include <AK/FileSystemPath.h>
|
#include <sys/wait.h>
|
||||||
#include <LibCore/CElapsedTimer.h>
|
#include <termios.h>
|
||||||
#include <LibCore/CDirIterator.h>
|
#include <unistd.h>
|
||||||
#include "GlobalState.h"
|
|
||||||
#include "Parser.h"
|
|
||||||
#include "LineEditor.h"
|
|
||||||
|
|
||||||
//#define SH_DEBUG
|
//#define SH_DEBUG
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user