Last change
on this file since 445 was 444, checked in by coas-nagasima, 4 years ago |
muslのソースコードを追加
|
-
Property svn:eol-style
set to
native
-
Property svn:mime-type
set to
text/x-csrc;charset=UTF-8
|
File size:
521 bytes
|
Line | |
---|
1 | #include <spawn.h>
|
---|
2 | #include <stdlib.h>
|
---|
3 | #include <string.h>
|
---|
4 | #include <errno.h>
|
---|
5 | #include "fdop.h"
|
---|
6 |
|
---|
7 | int posix_spawn_file_actions_addopen(posix_spawn_file_actions_t *restrict fa, int fd, const char *restrict path, int flags, mode_t mode)
|
---|
8 | {
|
---|
9 | struct fdop *op = malloc(sizeof *op + strlen(path) + 1);
|
---|
10 | if (!op) return ENOMEM;
|
---|
11 | op->cmd = FDOP_OPEN;
|
---|
12 | op->fd = fd;
|
---|
13 | op->oflag = flags;
|
---|
14 | op->mode = mode;
|
---|
15 | strcpy(op->path, path);
|
---|
16 | if ((op->next = fa->__actions)) op->next->prev = op;
|
---|
17 | op->prev = 0;
|
---|
18 | fa->__actions = op;
|
---|
19 | return 0;
|
---|
20 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.