Class: Nonnative::Process

Inherits:
Service
  • Object
show all
Defined in:
lib/nonnative/process.rb

Instance Attribute Summary

Attributes inherited from Service

#proxy

Instance Method Summary collapse

Methods inherited from Service

#initialize, #name

Constructor Details

This class inherits a constructor from Nonnative::Service

Instance Method Details

#startObject



5
6
7
8
9
10
11
12
13
# File 'lib/nonnative/process.rb', line 5

def start
  unless process_exists?
    proxy.start
    @pid = process_spawn
    wait_start
  end

  pid
end

#stopObject



15
16
17
18
19
20
21
22
23
# File 'lib/nonnative/process.rb', line 15

def stop
  if process_exists?
    process_kill
    proxy.stop
    wait_stop
  end

  pid
end