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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: phihag at phihag dot de
New email:
PHP Version: OS:

 

 [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)

Pull Requests

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.
 [2022-11-29 05:42 UTC] nazi dot farhadi3171 at gmail dot com
Thanks a lot for the reply (https://www.my-ascension.net/)github.com
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 21:01:28 2024 UTC