Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(417)

Side by Side Diff: fusl/src/process/posix_spawn_file_actions_adddup2.c

Issue 1573973002: Add a "fork" of musl as //fusl. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 #include <spawn.h>
2 #include <stdlib.h>
3 #include <errno.h>
4 #include "fdop.h"
5
6 int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *fa, int srcfd, int fd)
7 {
8 struct fdop *op = malloc(sizeof *op);
9 if (!op) return ENOMEM;
10 op->cmd = FDOP_DUP2;
11 op->srcfd = srcfd;
12 op->fd = fd;
13 if ((op->next = fa->__actions)) op->next->prev = op;
14 op->prev = 0;
15 fa->__actions = op;
16 return 0;
17 }
OLDNEW
« no previous file with comments | « fusl/src/process/posix_spawn_file_actions_addclose.c ('k') | fusl/src/process/posix_spawn_file_actions_addopen.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698