mailing list of musl libc
 help / color / mirror / code / Atom feed
8d34a9c4b2f76fa96375210b960eaebb155e3be6 blob 280 bytes (raw)

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

static void dummy(int x) { }
weak_alias(dummy, __fork_handler);

pid_t fork(void)
{
	__fork_handler(-1);
	pid_t ret = _Fork();
	int errno_save = errno;
	__fork_handler(!ret);
	if (ret<0) errno = errno_save;
	return ret;
}
debug log:

solving 8d34a9c4 ...
found 8d34a9c4 in https://git.vuxu.org/mirror/musl/

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).