Project

General

Profile

Feature #3715

Implement dup3()

Added by Theo Schlossnagle over 6 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Normal
Category:
-
Start date:
2013-04-11
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

dup3(int oldfd, int newfd, int flags);

Works like dup2 with the following exceptions:

1) flags can be O_CLOEXEC or 0, otherwise errno=EINVAL
2) flags effects newfd, if the function is successful
3) if oldfd and newfd are the same, the call fails errno=EINVAL

History

#1

Updated by Garrett D'Amore over 6 years ago

  • Status changed from New to Resolved

garrett@openindiana{115}> git log
commit 5dbfd19ad5fcc2b779f40f80fa05c1bd28fd0b4e
Author: Theo Schlossnagle <>
Date: Thu Apr 11 04:50:36 2013 +0000

3713 Implement accept4()
3714 Implement pipe2()
3715 Implement dup3()
3716 Implement mkostemp() and mkostemps()
3719 so_socketpair syscall should preserve FD_CLOEXEC flag
Reviewed by: Dan McDonald &lt;&gt;
Reviewed by: Robert Mustacchi &lt;&gt;
Approved by: Garrett D'Amore &lt;&gt;

Also available in: Atom PDF