#2484 assigned defect

pipe function always returns -1 and does not create subsequent pairs after the first pair is created

Reported by: Steve Helmer Owned by: Needs Funding
Priority: normal Milestone: Indefinite
Component: fs Version: 4.10
Severity: normal Keywords: pipe, pipe_create
Cc: Blocked By:
Blocking:

Description

There are two bugs in the version 4.10.2 cpukit/libfs/src/pipe/pipe.c.

The first one is in the call to rtems_filesystem_evaluate_path, the length of "/tmp" should be 4 not 3.

Second bug is at the end of the function pipe_create. Upon success it should return 0 not -1. The end of the code should look something like the following:

if (err == 0)

return 0;

else

rtems_set_errno_and_return_minus_one(err);

Attachments (2)

pipe.c (2.0 KB) - added by Steve Helmer on Dec 7, 2015 at 5:39:13 PM.
Updated version of pipe_create
pipe_test.c (2.3 KB) - added by Steve Helmer on Dec 7, 2015 at 5:46:59 PM.
Verification test of pipe function call.

Download all attachments as: .zip

Change History (7)

comment:1 Changed on Dec 7, 2015 at 5:35:52 PM by Joel Sherrill

Can you provide a patch?

The title says you can't create a second set. Do you have a simple test case for this?

Changed on Dec 7, 2015 at 5:39:13 PM by Steve Helmer

Attachment: pipe.c added

Updated version of pipe_create

comment:2 Changed on Dec 7, 2015 at 5:40:07 PM by Steve Helmer

Attached is updated version for 4.10.2

Changed on Dec 7, 2015 at 5:46:59 PM by Steve Helmer

Attachment: pipe_test.c added

Verification test of pipe function call.

comment:3 in reply to:  1 Changed on Dec 7, 2015 at 5:47:56 PM by Steve Helmer

Replying to joel.sherrill:

Can you provide a patch?

The title says you can't create a second set. Do you have a simple test case for this?

The attached file pipe_test.c verifies if the pipe call succeeds.

comment:4 Changed on Dec 8, 2015 at 6:54:58 AM by Sebastian Huber

There are several other problems with the pipes, see #2054, #2159 and #2227.

comment:5 Changed on Jan 23, 2017 at 1:50:24 PM by Sebastian Huber

Milestone: 4.10.3Indefinite
Owner: set to Needs Funding
Status: newassigned

In libbsd there is an alternative pipe implementation.

Note: See TracTickets for help on using tickets.