From 13cf4921e9fe8187378073272fd82ff2e09aa52a Mon Sep 17 00:00:00 2001 From: Arjan Oosting Date: Thu, 5 Feb 2015 15:45:44 +0100 Subject: [PATCH] Use fopen instead of expect_popen. This way there are no zombie ssh processen left around (see https://bugs.php.net/bug.php?id=57918) --- netconf/Device.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netconf/Device.php b/netconf/Device.php index 18a1bb6..3600739 100644 --- a/netconf/Device.php +++ b/netconf/Device.php @@ -133,7 +133,7 @@ public function Device_array(array $params) *operations. */ public function connect() { - $this->stream = expect_popen("ssh -o ConnectTimeout=$this->connectTimeout $this->userName@$this->hostName -p $this->port -s netconf"); + $this->stream = fopen("expect://ssh -o ConnectTimeout=$this->connectTimeout $this->userName@$this->hostName -p $this->port -s netconf", "rw"); ini_set('expect.timeout', $this->replyTimeout); $flag = true; while ($flag) {