Plan 9 from User Space's /usr/local/plan9/src/lib9/dup.c

#include <u.h>
#include <libc.h>

#undef dup

int
p9dup(int old, int new)
{
	if(new == -1)
		return dup(old);
	return dup2(old, new);
}

Space Glenda

Copyright © 2005 Lucent Technologies, Russ Cox, MIT.
See license for details.