#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 12/07/15 at 17:39:13.
Updated version of pipe_create
pipe_test.c (2.3 KB) - added by Steve Helmer on 12/07/15 at 17:46:59.
Verification test of pipe function call.

Download all attachments as: .zip

Change History (7)

comment:1 Changed on 12/07/15 at 17:35:52 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 12/07/15 at 17:39:13 by Steve Helmer

Attachment: pipe.c added

Updated version of pipe_create

comment:2 Changed on 12/07/15 at 17:40:07 by Steve Helmer

Attached is updated version for 4.10.2

Changed on 12/07/15 at 17:46:59 by Steve Helmer

Attachment: pipe_test.c added

Verification test of pipe function call.

comment:3 in reply to:  1 Changed on 12/07/15 at 17:47:56 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 12/08/15 at 06:54:58 by Sebastian Huber

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

comment:5 Changed on 01/23/17 at 13:50:24 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.