mailing list of musl libc
 help / color / mirror / code / Atom feed
7bfcaf2d52b74d47f074762bc7e5495024f98a6d blob 373 bytes (raw)

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

int dup2(int old, int new)
{
	int r;
#ifdef SYS_dup2
	while ((r=__syscall(SYS_dup2, old, new))==-EBUSY);
#else
	if (old==new) {
		if (__syscall(SYS_fcntl, old, F_GETFD) < 0)
			return __syscall_ret(-EBADF);
		return 0;
	}
	while ((r=__syscall(SYS_dup3, old, new, 0))==-EBUSY);
#endif
	return __syscall_ret(r);
}
debug log:

solving 7bfcaf2 ...
found 7bfcaf2 in https://inbox.vuxu.org/musl/20140525054237.GA18085@brightrain.aerifal.cx/
found 87a0d44 in https://git.vuxu.org/mirror/musl/
preparing index
index prepared:
100644 87a0d44538eb49162bf4d26824b0d35de19af0fb	src/unistd/dup2.c

applying [1/1] https://inbox.vuxu.org/musl/20140525054237.GA18085@brightrain.aerifal.cx/
diff --git a/src/unistd/dup2.c b/src/unistd/dup2.c
index 87a0d44..7bfcaf2 100644

Checking patch src/unistd/dup2.c...
Applied patch src/unistd/dup2.c cleanly.

index at:
100644 7bfcaf2d52b74d47f074762bc7e5495024f98a6d	src/unistd/dup2.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).