Exception: KairosMcp::Daemon::PidLock::AlreadyLocked

Inherits:
StandardError
  • Object
show all
Defined in:
lib/kairos_mcp/daemon/pid_lock.rb

Overview

Raised when another process already holds the lock.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path, holder_pid) ⇒ AlreadyLocked

Returns a new instance of AlreadyLocked.



19
20
21
22
23
# File 'lib/kairos_mcp/daemon/pid_lock.rb', line 19

def initialize(path, holder_pid)
  @path = path
  @holder_pid = holder_pid
  super("Daemon already running (pid=#{holder_pid || 'unknown'}, lock=#{path})")
end

Instance Attribute Details

#holder_pidObject (readonly)

Returns the value of attribute holder_pid.



17
18
19
# File 'lib/kairos_mcp/daemon/pid_lock.rb', line 17

def holder_pid
  @holder_pid
end

#pathObject (readonly)

Returns the value of attribute path.



17
18
19
# File 'lib/kairos_mcp/daemon/pid_lock.rb', line 17

def path
  @path
end