#2158 reopened defect

dup2 is broken

Reported by: Chris Johns Owned by: Chris Johns
Priority: normal Milestone: Indefinite
Component: fs Version: 4.11
Severity: normal Keywords: POSIX-Compliance
Cc: sebastian.huber@… Blocked By:
Blocking:

Description (last modified by Joel Sherrill)

The dup2 call is just the dup call and this is wrong. The switch in fcntl needs to know which call is dup and which is dup2.

The dup2 call is needed to implement redirection.

Attachments (1)

rtems-dup2-fix.diff (3.5 KB) - added by Chris Johns on Dec 3, 2013 at 5:16:36 PM.
Add dup2 support.

Download all attachments as: .zip

Change History (12)

Changed on Dec 3, 2013 at 5:16:36 PM by Chris Johns

Attachment: rtems-dup2-fix.diff added

Add dup2 support.

comment:1 Changed on Dec 3, 2013 at 5:16:54 PM by Chris Johns

Status: newassigned

comment:2 Changed on Dec 10, 2013 at 2:14:52 AM by Chris Johns

Resolution: fixed
Status: assignedclosed

comment:3 Changed on Dec 10, 2013 at 6:54:45 AM by Sebastian Huber

Resolution: fixed
Status: closedreopened, sebastian.huber@embedded-brains.de

comment:4 Changed on Dec 10, 2013 at 7:56:07 PM by Chris Johns

Good idea to link the test case to this PR. I have code to add which redirects stderr and stdout to a buffer.

comment:5 Changed on Nov 24, 2014 at 6:58:28 PM by Gedare

Version: HEAD4.11

Replace Version=HEAD with Version=4.11 for the tickets with Milestone >= 4.11

comment:6 Changed on Mar 2, 2015 at 8:42:45 PM by Gedare

Milestone: 4.114.11.1

bump milestone

comment:7 Changed on Feb 12, 2016 at 7:46:07 PM by Joel Sherrill

Description: modified (diff)

I added this ticket to the potential GSoC project https://devel.rtems.org/wiki/Developer/Projects/Open/POSIXCompliance. Chris mentioned a test case. Where is it? It would be good to get that available.

comment:8 Changed on Jan 26, 2017 at 7:16:00 AM by Sebastian Huber

Milestone: 4.11.14.11.2

comment:9 Changed on Mar 23, 2017 at 1:03:28 AM by Chris Johns

Milestone: 4.11.24.11.3

The 4.11.2 milestone is closing.

comment:10 Changed on Apr 3, 2017 at 11:29:20 PM by Joel Sherrill

Keywords: POSIX-Compliance added

comment:11 Changed on Feb 7, 2018 at 11:19:52 PM by Chris Johns

Milestone: 4.11.3Indefinite

Requires funding to add a test case. The patch is applied.

Note: See TracTickets for help on using tickets.