php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59451 Change expect.logfile on runtime leave file descriptor opened
Submitted: 2010-10-07 07:44 UTC Modified: 2010-10-10 07:17 UTC
From: miquelcanes at gmail dot com Assigned:
Status: Closed Package: expect (PECL)
PHP Version: 5.3.2 OS: Centos 5 kernel 2.6.18-194
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: miquelcanes at gmail dot com
New email:
PHP Version: OS:

 

 [2010-10-07 07:44 UTC] miquelcanes at gmail dot com
Description:
------------
Change expect.logfile on runtime using 
ini_set("expect.logfile") more than once leave old files 
opened.

Check it using strace or similar.



Reproduce code:
---------------
<?php
ini_set("expect.logfile", "logexpect1.out");

$stream = expect_popen("telnet 192.168.1.1");

fclose ($stream);

ini_set("expect.logfile", "logexpect2.out");

$stream = expect_popen("telnet 192.168.1.1");

fclose ($stream);

?>

Expected result:
----------------
check with strace.
File descriptor is not closed after changing expect output 
file.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-10-10 03:41 UTC] spektom at gmail dot com
Thank you for your bug report. This issue has been fixed
in the latest released version of the package, which you can download at
http://pecl.php.net/get/expect


 [2010-10-10 07:17 UTC] miquelcanes at gmail dot com
Thank you!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 22:01:30 2024 UTC