Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99815 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11949 invoked from network); 7 Jul 2017 20:39:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Jul 2017 20:39:07 -0000 Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.46 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.218.46 mail-oi0-f46.google.com Received: from [209.85.218.46] ([209.85.218.46:32995] helo=mail-oi0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8D/64-47109-761FF595 for ; Fri, 07 Jul 2017 16:39:03 -0400 Received: by mail-oi0-f46.google.com with SMTP id p188so37002579oia.0 for ; Fri, 07 Jul 2017 13:39:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=dq1hQvUg1yJ6U48YGRoZAEjA4SMMqfzKSXlEj3qGHwo=; b=mgu1d4aCKLIb+rnCRcz6f9eb5z/KiA9+18u7IHcCvms3NQA3+eyORhriX4vN1ufoGu tz5LSE6IfZWIO47oKR/Gg4peMnkR3PZfC7VRp3Mt2DhUtRkpbgMAihlpe4/QI+vzLNRt 0FqWNtfbRWfCjv4wl42AGg6Dhmu8Dr76/mTvXuXKsiER5od4H6gZOUEKEGveGqLnAOiZ y1LaPhM3jiMgrv+8CrnM0W6rH4RzR2Nh3vgRyCwshBFBQFQKyaVR/0EsEs+5Ng4btfiT iQcvvhz07BwMwKDdSoJn8+TEObV3+5xINptjuQGzMck8pU3B2Vw1DJ4Mcol8N2nzBo7L hGpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=dq1hQvUg1yJ6U48YGRoZAEjA4SMMqfzKSXlEj3qGHwo=; b=X4DJGw9+2J+JkNwN6bR7Q1uob9CtcuMgiBWWy9Jt1It8Cz0JYlu4DhgzaiIeg5iX+1 egURm0PezAA+QnZhn0aj9KFrAJRs2plRSnvlMGAgz4yy0o3hSG8bv39T0rZ1vuwAPXK0 kARXurcMM1CnkWLLGufG+0gEaCYI3mSo1eea9Kd7QE9lVULbpG0QVN/M39CgWYq+VVhx XXoTbXYUkEsUkVFTXnEU6oUp0wstMJJ1y7mOP2J4i6P9QGUknwzGCdJiCIkIPBLk8piA xgDzOkcxc/ZsPQtPdeiL7XH6cWjJmRFEAuM2TW1U1hqleDpz5w2FUzwdKfShmjsWo3qB RdgA== X-Gm-Message-State: AIVw113HPPEK6hfUwYRnHGtkaXnEA/m7ZSIjrL8pd2kSe/4oJjZ7BQJC NTQbXlME0qe+dpHtnnDoQ8BK5n91ZA== X-Received: by 10.202.79.200 with SMTP id d191mr1671167oib.103.1499459940678; Fri, 07 Jul 2017 13:39:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.74.70.1 with HTTP; Fri, 7 Jul 2017 13:39:00 -0700 (PDT) In-Reply-To: <2eb9e379-ffcd-75d9-b0c6-8f0505164a85@list.imperialat.at> References: <2eb9e379-ffcd-75d9-b0c6-8f0505164a85@list.imperialat.at> Date: Fri, 7 Jul 2017 22:39:00 +0200 Message-ID: To: Martijn van Duren Cc: PHP Internals Content-Type: multipart/alternative; boundary="001a113d81c21e82780553c039ec" Subject: Re: [PHP-DEV] Getting fd from stream From: tyra3l@gmail.com (Ferenc Kovacs) --001a113d81c21e82780553c039ec Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Jul 7, 2017 at 10:14 PM, Martijn van Duren wrote: > Hello Ferenc, > > On 07/07/17 19:49, Ferenc Kovacs wrote: > > > > > > On Thu, Jul 6, 2017 at 11:12 AM, Martijn van Duren < > php@list.imperialat.at > wrote: > > > > Hello internals@, > > > > I have an (exotic) case where I need to be able to get the > > filedescriptor from a previously opened stream (via > stream_socket_pair) > > to hand over to the child process, which needs to reexecute. > > > > I saw that the php:// wrapper supports php://fd/X syntax, so I reck= on > > there should be a way to extract the information as well from a > stream > > as well. Unfortunately I don't seem to be able to find it. > > > > Can someone point me in the right direction? > > > > Sincerely, > > > > Martijn van Duren > > > > -- > > PHP Internals - PHP Runtime Development Mailing List > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > hi, > > > > would you need something like fildes_fileno() from > https://github.com/Tyrael/php-fildes ? > > I never managed to put that up for pecl, not sure if it even compiles > anymore with recent php versions > > > Thanks for the hint, but I'd like to refrain from external > libraries as much as I can, especially for something simple as > a simple number inside a data structure. > > I might also achieve something like this by eio from pecl, through > e.g. eio_dup2, but it's just unrealistic overkill to ask for a full > extension installation for just 1 one trivial piece of functionality. > > > > -- > > Ferenc Kov=C3=A1cs > > @Tyr43l - http://tyrael.hu > sure, I just thought that you are asking for a solution and not proposing a new feature/function to the core. --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --001a113d81c21e82780553c039ec--