Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99798 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82473 invoked from network); 6 Jul 2017 14:53:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Jul 2017 14:53:50 -0000 Authentication-Results: pb1.pair.com smtp.mail=kalle.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=kalle.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.66 as permitted sender) X-PHP-List-Original-Sender: kalle.php@gmail.com X-Host-Fingerprint: 209.85.214.66 mail-it0-f66.google.com Received: from [209.85.214.66] ([209.85.214.66:36831] helo=mail-it0-f66.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8F/55-47109-CFE4E595 for ; Thu, 06 Jul 2017 10:53:49 -0400 Received: by mail-it0-f66.google.com with SMTP id k3so766865ita.3 for ; Thu, 06 Jul 2017 07:53:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=359QffaX65/muy4JXT41GnbOnBphXrgMM5MhmIVsPPU=; b=VdbEA0f2Q4muAyKvxjgPo8Li9GWYz8zA+Wx7+xQhj/gzz8sdNTLr2LPuFzWZF8FS5u Zrss2LJeR+DbbeLsL4XPhxNCXMzkmyS01BV5YsVrRRTIVZbb8fUqeRewnkbI4zGicSZT 2oSBfgOLtuf89x0C8XL2y0qFoWNzPeQ/d+F0sEfc9ojfYPIrJQx7k61p0Skr0k1ssQk+ 4dBPrtPgAm9FnPsztLfiIDZwjg1q3mWGyAWVzc0uTiK12efy4ynyvTujWVcpoVculfJY XJxFD+tm5q1XOgfgIyysCAAIeRvChV8jpEnAd2HR8KVlv8o74fr2N62n3vuT44Na8OmW 9K1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=359QffaX65/muy4JXT41GnbOnBphXrgMM5MhmIVsPPU=; b=tYV1+EU6qmENWSSlA0t1ntbxuWNaufazlJQYYymxalqqmlUA8VpKsXTw5igLQWTU2N locQl5fO3CjtGGiACRK4fTF+Fj3r5gENMvatSuqc0KWEbQwrZZt0S3weDTtS65/2AfYc ftjn+TUwGyGw8SJXX40IetNnor+kFOdkeR/ME1c/0R6YhlQZ89c3eT4wEtoOdvn1u42F Y8izbCaNjAceNUgcOsIVa1MytxZPmzCusUYvpIwcM8wK8OrF0df+bT77JVchCUHkw+kt NiKAlGbved8Mds1WPsOVoH7Wh7W/rQCRvN/eYZM9WTRgwbPFEsDXmL997h9glebe0uJz wN5g== X-Gm-Message-State: AIVw112rqdsgbpHxjFq4gFm4oDQpV6wM4fc0bq3Jrp/rpuD9M6OFKvYA e1gkQP2pHq8UoE6j/i1ruSRRTRD3eOQH X-Received: by 10.36.196.2 with SMTP id v2mr15620246itf.84.1499352825376; Thu, 06 Jul 2017 07:53:45 -0700 (PDT) MIME-Version: 1.0 Sender: kalle.php@gmail.com Received: by 10.107.150.209 with HTTP; Thu, 6 Jul 2017 07:53:44 -0700 (PDT) In-Reply-To: References: Date: Thu, 6 Jul 2017 16:53:44 +0200 X-Google-Sender-Auth: l2Hl5hP-4wQ1jqkwePTVcC_SpIE Message-ID: To: Martijn van Duren , Sara Golemon Cc: Internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Getting fd from stream From: kalle@php.net (Kalle Sommer Nielsen) Hi Martijn 2017-07-06 11:12 GMT+02:00 Martijn van Duren : > 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 reckon > 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? It seems like this is not exposed at all by PHP. I have CC'ed Sara as one of the old school streams persons, maybe she has some insights why it is not exposed or if it is worth exposing fileno() in 7.2+ -- regards, Kalle Sommer Nielsen kalle@php.net