Class: Fusuma::Plugin::Appmatcher::UnsupportedBackend
- Inherits:
-
Object
- Object
- Fusuma::Plugin::Appmatcher::UnsupportedBackend
- Includes:
- UserSwitcher
- Defined in:
- lib/fusuma/plugin/appmatcher/unsupported_backend.rb
Overview
Dummy for unsupported Backend
Defined Under Namespace
Classes: Matcher
Instance Attribute Summary collapse
-
#reader ⇒ Object
readonly
Returns the value of attribute reader.
-
#writer ⇒ Object
readonly
Returns the value of attribute writer.
Instance Method Summary collapse
-
#initialize ⇒ UnsupportedBackend
constructor
A new instance of UnsupportedBackend.
-
#watch_start ⇒ Integer
fork process and watch signal.
Methods included from UserSwitcher
#as_user, #drop_priv, login_user
Constructor Details
#initialize ⇒ UnsupportedBackend
Returns a new instance of UnsupportedBackend.
17 18 19 20 |
# File 'lib/fusuma/plugin/appmatcher/unsupported_backend.rb', line 17 def initialize # need IO object for IO.select() @reader, @writer = IO.pipe end |
Instance Attribute Details
#reader ⇒ Object (readonly)
Returns the value of attribute reader.
15 16 17 |
# File 'lib/fusuma/plugin/appmatcher/unsupported_backend.rb', line 15 def reader @reader end |
#writer ⇒ Object (readonly)
Returns the value of attribute writer.
15 16 17 |
# File 'lib/fusuma/plugin/appmatcher/unsupported_backend.rb', line 15 def writer @writer end |
Instance Method Details
#watch_start ⇒ Integer
fork process and watch signal
24 25 26 27 28 29 30 31 32 |
# File 'lib/fusuma/plugin/appmatcher/unsupported_backend.rb', line 24 def watch_start @watch_start ||= begin pid = as_user(proctitle: self.class.name.underscore) do @reader.close sleep # stop indefinitely without using CPU end pid end end |