20 lines
1,014 B
C
20 lines
1,014 B
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* fd_replace.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: jhalford <jhalford@student.42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2017/03/21 16:32:26 by jhalford #+# #+# */
|
|
/* Updated: 2017/03/24 22:59:28 by jhalford ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "libft.h"
|
|
|
|
int fd_replace(int fd1, int fd2)
|
|
{
|
|
if (fd1 != fd2)
|
|
return (dup2_close(fd1, fd2));
|
|
return (0);
|
|
}
|