php_process 0.0.3 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/php_process.rb +7 -1
- data/lib/php_script.php +1 -1
- data/php_process.gemspec +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.5
|
data/lib/php_process.rb
CHANGED
@@ -61,9 +61,13 @@ class Php_process
|
|
61
61
|
@args[:on_err].call(str) if @args[:on_err]
|
62
62
|
$stderr.print "Process error: #{str}" if @debug or @args[:debug_stderr]
|
63
63
|
|
64
|
-
if str.match(/^PHP Fatal error: (.+)\s
|
64
|
+
if str.match(/^PHP Fatal error: (.+)\s*/)
|
65
65
|
@fatal = str.strip
|
66
|
+
elsif str.match(/^Killed\s*$/)
|
67
|
+
@fatal = "Process was killed."
|
66
68
|
end
|
69
|
+
|
70
|
+
break if (!@args and str.to_s.strip.length <= 0) or (@stderr and @stderr.closed?)
|
67
71
|
end
|
68
72
|
end
|
69
73
|
|
@@ -316,6 +320,8 @@ class Php_process
|
|
316
320
|
def start_read_loop
|
317
321
|
@thread = Knj::Thread.new do
|
318
322
|
@stdout.lines do |line|
|
323
|
+
break if line == nil or @stdout.closed?
|
324
|
+
|
319
325
|
data = line.split(":")
|
320
326
|
args = PHP.unserialize(Base64.strict_decode64(data[2].strip))
|
321
327
|
type = data[0]
|
data/lib/php_script.php
CHANGED
@@ -39,7 +39,7 @@ class php_process{
|
|
39
39
|
$id = intval($data[1]);
|
40
40
|
$args = unserialize(base64_decode($data[2]));
|
41
41
|
if ($args === false){
|
42
|
-
throw new exception("The args-data was not unserializeable: " .
|
42
|
+
throw new exception("The args-data was not unserializeable: " . base64_decode($data[2]));
|
43
43
|
}
|
44
44
|
|
45
45
|
try{
|
data/php_process.gemspec
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: php_process
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.5
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Kasper Johansen
|
@@ -126,7 +126,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
126
126
|
requirements:
|
127
127
|
- - ">="
|
128
128
|
- !ruby/object:Gem::Version
|
129
|
-
hash: -
|
129
|
+
hash: -1085351998058726147
|
130
130
|
segments:
|
131
131
|
- 0
|
132
132
|
version: "0"
|