Class: SafeImage::Zygote::Worker

Inherits:
Struct
  • Object
show all
Defined in:
lib/safe_image/zygote.rb

Overview

generation: the pool generation a worker was born into; shutdown!/fork bump the generation so a worker checked out under the old config is retired (never re-pooled) when it returns. owner_pid: the process that spawned it, so a worker inherited across fork is never killed by the child (it belongs to the parent). tmproot: a parent-created directory the worker puts its per-operation tmpdirs under. The worker removes it on graceful exit (at_exit); the parent removes it when it kills the worker, so a SIGKILL mid-operation (where the worker cannot clean up) does not leak the op’s tmpdir.

Instance Attribute Summary collapse

Instance Attribute Details

#generationObject

Returns the value of attribute generation

Returns:

  • (Object)

    the current value of generation



78
79
80
# File 'lib/safe_image/zygote.rb', line 78

def generation
  @generation
end

#last_usedObject

Returns the value of attribute last_used

Returns:

  • (Object)

    the current value of last_used



78
79
80
# File 'lib/safe_image/zygote.rb', line 78

def last_used
  @last_used
end

#owner_pidObject

Returns the value of attribute owner_pid

Returns:

  • (Object)

    the current value of owner_pid



78
79
80
# File 'lib/safe_image/zygote.rb', line 78

def owner_pid
  @owner_pid
end

#pidObject

Returns the value of attribute pid

Returns:

  • (Object)

    the current value of pid



78
79
80
# File 'lib/safe_image/zygote.rb', line 78

def pid
  @pid
end

#stdinObject

Returns the value of attribute stdin

Returns:

  • (Object)

    the current value of stdin



78
79
80
# File 'lib/safe_image/zygote.rb', line 78

def stdin
  @stdin
end

#stdoutObject

Returns the value of attribute stdout

Returns:

  • (Object)

    the current value of stdout



78
79
80
# File 'lib/safe_image/zygote.rb', line 78

def stdout
  @stdout
end

#tmprootObject

Returns the value of attribute tmproot

Returns:

  • (Object)

    the current value of tmproot



78
79
80
# File 'lib/safe_image/zygote.rb', line 78

def tmproot
  @tmproot
end