php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #60896 Provide a wrapper for pipe(2)
Submitted: 2012-01-26 23:28 UTC Modified: 2012-01-27 16:33 UTC
Votes:12
Avg. Score:4.4 ± 0.5
Reproduced:12 of 12 (100.0%)
Same Version:7 (58.3%)
Same OS:10 (83.3%)
From: phihag at phihag dot de Assigned:
Status: Open Package: POSIX related
PHP Version: Irrelevant OS: Unix
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2012-01-26 23:28 UTC] phihag at phihag dot de
Description:
------------
Currently, there does not seem to be a way to create an anonymous pipe (which is 
particularily) via the pipe(2) system call. There should be a wrapper for pipe 
and optionally pipe2 in php. See 
http://pubs.opengroup.org/onlinepubs/009695399/functions/pipe.html for the POSIX 
spec.

Test script:
---------------
<?
list($readfd, $writefd) = posix_pipe();


Patches

php5-pipe2 (last revision 2014-07-09 10:34 UTC by bandie9100 at gmail dot com)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-01-27 16:33 UTC] cataphract@php.net
Note the most common use case is covered by proc_open
 [2012-10-02 08:21 UTC] olav dot morken at uninett dot no
Support for unnamed pipes are useful with pcntl_fork(). That would allow for easy communication between parent and child processes.

A workaround is to use socket_create_pair(). However, sockets are not as lightweight as pipes.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Mar 31 20:01:24 2020 UTC