mailing list of musl libc
 help / color / mirror / code / Atom feed
8840dbd698dda8b54d1b277c20ed428c4d5cfc0c blob 553 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
 
#include <spawn.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->fa_ops[fa->fa_cnt++] = fd;
	fa->fa_ops[fa->fa_cnt++] = -FDOP_OPEN;
	fa->fa_ops[fa->fa_cnt++] = flags;
	fa->fa_ops[fa->fa_cnt++] = mode;
	memcpy((posix_spawn_file_actions_t *)fa->fa_chain + 1, path, len + 1);
	return 0;
}
debug log:

solving 8840dbd6 ...
found 8840dbd6 in https://inbox.vuxu.org/musl/20220506190716.0d0483778c4bf15daddc22a3@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/1] https://inbox.vuxu.org/musl/20220506190716.0d0483778c4bf15daddc22a3@zhasha.com/
diff --git a/src/process/posix_spawn_file_actions_addopen.c b/src/process/posix_spawn_file_actions_addopen.c
index 82bbcec9..8840dbd6 100644

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

index at:
100644 8840dbd698dda8b54d1b277c20ed428c4d5cfc0c	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).