[PATCH 22/46] fork: Use clone if arch does not have the fork syscall

Mike Frysinger vapier at gentoo.org
Sat Nov 17 20:34:52 UTC 2012


On Tuesday 13 November 2012 06:31:31 Markos Chandras wrote:
> +pid_t __libc_fork(void)
> +{
> +	pid_t pid;
> +	pid = INLINE_SYSCALL(clone, 4, SIGCHLD, NULL, NULL, NULL);

merge the definition & assignment

> +	if (pid<0) {

if (pid < 0) {

> +		__set_errno(-pid);
> +		return -1;
> +	}

although, is this really necessary ?  seems to me that INLINE_SYSCAL() already 
takes care of setting errno correctly ...

	return INLINE_SYSCALL(clone, 4, SIGCHLD, NULL, NULL, NULL);

> +weak_alias(__libc_fork,fork)

space after the comma
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.busybox.net/pipermail/uclibc/attachments/20121117/96cb9888/attachment.asc>


More information about the uClibc mailing list