mailing list of musl libc
 help / color / mirror / code / Atom feed
1c41939651a19aa41173859479f802288ea6622d blob 580 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
 
#include <spawn.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include "fdop.h"

int posix_spawn_file_actions_addopen(posix_spawn_file_actions_t *restrict fa, int fd, const char *restrict path, int flags, mode_t mode)
{
	size_t len;
	if (fd < 0) return EBADF;
	len = strlen(path);
	if (faexpand(fa, len + 1) != 0) return ENOMEM;
	fa->__pad[fa->__pad0[0]++] = fd;
	fa->__pad[fa->__pad0[0]++] = -FDOP_OPEN;
	fa->__pad[fa->__pad0[0]++] = flags;
	fa->__pad[fa->__pad0[0]++] = mode;
	memcpy((posix_spawn_file_actions_t *)fa->__actions + 1, path, len + 1);
	return 0;
}
debug log:

solving 1c419396 ...
found 1c419396 in https://inbox.vuxu.org/musl/YfVEgMUnilYQBbVE@wirbelwind.zhasha.com/ ||
	https://inbox.vuxu.org/musl/Yf152c5ZpA+TY4X+@wirbelwind.zhasha.com/
found 82bbcec9 in https://git.vuxu.org/mirror/musl/
preparing index
index prepared:
100644 82bbcec9eb42cd5f112d2a6b66d0769b8349f11f	src/process/posix_spawn_file_actions_addopen.c

applying [1/2] https://inbox.vuxu.org/musl/YfVEgMUnilYQBbVE@wirbelwind.zhasha.com/
diff --git a/src/process/posix_spawn_file_actions_addopen.c b/src/process/posix_spawn_file_actions_addopen.c
index 82bbcec9..1c419396 100644

Checking patch src/process/posix_spawn_file_actions_addopen.c...
Applied patch src/process/posix_spawn_file_actions_addopen.c cleanly.

skipping https://inbox.vuxu.org/musl/Yf152c5ZpA+TY4X+@wirbelwind.zhasha.com/ for 1c419396
index at:
100644 1c41939651a19aa41173859479f802288ea6622d	src/process/posix_spawn_file_actions_addopen.c

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).