File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed
Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 11language : ruby
22rvm :
3- - 1.8.7
43 - 1.9.3
54 - 2.2.1
65
Original file line number Diff line number Diff line change @@ -58,7 +58,11 @@ def start(options = {})
5858 end
5959
6060 system ( "echo '' > '#{ @logfile } '" )
61- @process = IO . popen ( command )
61+ if defined? spawn
62+ @pid = spawn ( command )
63+ Process . detach @pid
64+ end
65+ #@process = IO.popen(command)
6266 @stdout = File . open ( @logfile , "r" )
6367
6468 while true
@@ -75,7 +79,7 @@ def start(options = {})
7579 return
7680 end
7781 if line . strip == "Press Ctrl-C to exit"
78- @pid = @process . pid
82+ # @pid = @process.pid
7983 @stdout . close
8084 break
8185 end
@@ -96,10 +100,10 @@ def stop
96100 puts "PID #{ @pid } "
97101 puts `ps aux| grep BrowserStackLocal`
98102 puts `lsof -i:45691`
99- Process . kill ( "INT " , @pid )
100- sleep 3
101- Process . kill ( "KILL" , @pid )
102- @process . close
103+ Process . kill ( "TERM " , @pid )
104+ # sleep 3
105+ # Process.kill("KILL", @pid)
106+ # @process.close
103107 puts "Closed"
104108 puts `ps aux| grep BrowserStackLocal`
105109 puts `lsof -i:45691`
You can’t perform that action at this time.
0 commit comments