PatchworkOS
Loading...
Searching...
No Matches
spawn.c
Go to the documentation of this file.
1
#include <
stdio.h
>
2
#include <
sys/io.h
>
3
4
#include "
user/common/syscalls.h
"
5
6
pid_t
spawn
(
const
char
** argv,
const
spawn_fd_t
* fds,
const
char
* cwd,
spawn_attr_t
* attr)
7
{
8
pid_t
result =
_syscall_spawn
(argv, fds, cwd, attr);
9
if
(result ==
ERR
)
10
{
11
errno
=
_syscall_errno
();
12
}
13
return
result;
14
}
errno
#define errno
Error number variable.
Definition
errno.h:27
spawn
pid_t spawn(const char **argv, const spawn_fd_t *fds, const char *cwd, spawn_attr_t *attr)
System call for creating child processes.
Definition
spawn.c:6
ERR
#define ERR
Integer error value.
Definition
ERR.h:17
pid_t
__UINT64_TYPE__ pid_t
Process Identifier.
Definition
pid_t.h:11
io.h
syscalls.h
_syscall_errno
static errno_t _syscall_errno(void)
Definition
syscalls.h:118
_syscall_spawn
static pid_t _syscall_spawn(const char **argv, const spawn_fd_t *fds, const char *cwd, spawn_attr_t *attr)
Definition
syscalls.h:107
stdio.h
spawn_attr_t
Definition
proc.h:89
spawn_fd_t
Stucture used to duplicate fds in spawn().
Definition
proc.h:55
src
libstd
user
functions
proc
spawn.c
Generated by
1.9.8