mlanett-daemons 1.0.13 → 1.1.10.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. data/Gemfile.lock +12 -2
  2. data/LICENSE +1 -8
  3. data/README-mlanett.rdoc +8 -0
  4. data/{README → README.rdoc} +6 -15
  5. data/Releases +84 -9
  6. data/TODO +1 -5
  7. data/daemons.gemspec +1 -0
  8. data/examples/call/call.rb +1 -0
  9. data/examples/daemonize/daemonize.rb +10 -3
  10. data/examples/run/ctrl_hanging.rb +19 -0
  11. data/examples/run/ctrl_monitor_multiple.rb +18 -0
  12. data/examples/run/ctrl_normal.rb +0 -1
  13. data/examples/run/ctrl_proc.rb.output +20 -0
  14. data/examples/run/ctrl_proc_rand.rb +23 -0
  15. data/examples/run/ctrl_slowstop.rb +16 -0
  16. data/examples/run/myserver_crashing.rb +2 -2
  17. data/examples/run/myserver_hanging.rb +21 -0
  18. data/examples/run/myserver_slowstop.rb +21 -0
  19. data/lib/daemons.rb +38 -10
  20. data/lib/daemons/application.rb +131 -26
  21. data/lib/daemons/application_group.rb +58 -10
  22. data/lib/daemons/change_privilege.rb +19 -0
  23. data/lib/daemons/cmdline.rb +10 -6
  24. data/lib/daemons/controller.rb +5 -2
  25. data/lib/daemons/daemonize.rb +64 -150
  26. data/lib/daemons/etc_extension.rb +12 -0
  27. data/lib/daemons/exceptions.rb +3 -0
  28. data/lib/daemons/monitor.rb +27 -19
  29. data/lib/daemons/pid.rb +13 -14
  30. data/lib/daemons/pidfile.rb +14 -7
  31. data/lib/daemons/pidmem.rb +9 -0
  32. data/lib/daemons/version.rb +1 -1
  33. data/spec/pidfile_spec.rb +12 -0
  34. data/spec/spec_helper.rb +1 -0
  35. metadata +31 -47
  36. data/daemons.tmproj +0 -56
  37. data/examples/run/myserver_crashing.rb.output +0 -30
  38. data/html/classes/Daemonize.html +0 -497
  39. data/html/classes/Daemons.html +0 -683
  40. data/html/classes/Daemons/Application.html +0 -836
  41. data/html/classes/Daemons/ApplicationGroup.html +0 -508
  42. data/html/classes/Daemons/CmdException.html +0 -113
  43. data/html/classes/Daemons/Controller.html +0 -429
  44. data/html/classes/Daemons/Error.html +0 -113
  45. data/html/classes/Daemons/Exception.html +0 -111
  46. data/html/classes/Daemons/Monitor.html +0 -263
  47. data/html/classes/Daemons/Optparse.html +0 -244
  48. data/html/classes/Daemons/Pid.html +0 -339
  49. data/html/classes/Daemons/PidFile.html +0 -441
  50. data/html/classes/Daemons/PidMem.html +0 -126
  51. data/html/classes/Daemons/RuntimeException.html +0 -113
  52. data/html/classes/Daemons/SystemError.html +0 -163
  53. data/html/created.rid +0 -1
  54. data/html/files/README.html +0 -377
  55. data/html/files/Releases.html +0 -342
  56. data/html/files/TODO.html +0 -121
  57. data/html/files/lib/daemons/application_group_rb.html +0 -101
  58. data/html/files/lib/daemons/application_rb.html +0 -110
  59. data/html/files/lib/daemons/cmdline_rb.html +0 -101
  60. data/html/files/lib/daemons/controller_rb.html +0 -101
  61. data/html/files/lib/daemons/daemonize_rb.html +0 -207
  62. data/html/files/lib/daemons/exceptions_rb.html +0 -101
  63. data/html/files/lib/daemons/monitor_rb.html +0 -108
  64. data/html/files/lib/daemons/pid_rb.html +0 -108
  65. data/html/files/lib/daemons/pidfile_rb.html +0 -108
  66. data/html/files/lib/daemons/pidmem_rb.html +0 -108
  67. data/html/files/lib/daemons_rb.html +0 -117
  68. data/html/fr_class_index.html +0 -41
  69. data/html/fr_file_index.html +0 -40
  70. data/html/fr_method_index.html +0 -91
  71. data/html/index.html +0 -24
  72. data/html/rdoc-style.css +0 -208
  73. data/test/call_as_daemon.rb +0 -12
  74. data/test/tc_main.rb +0 -24
  75. data/test/test1.rb +0 -19
  76. data/test/testapp.rb +0 -11
@@ -1,12 +0,0 @@
1
- SCRIPT_DIR = File.split(File.expand_path(__FILE__))[0]
2
-
3
- $LOAD_PATH << File.join(SCRIPT_DIR, '../lib')
4
-
5
-
6
- require 'pp'
7
-
8
- require 'daemons'
9
-
10
- print Daemonize::call_as_daemon(File.join(SCRIPT_DIR, 'tmp/call_as_daemon.log')) {
11
- print "hello"
12
- }
data/test/tc_main.rb DELETED
@@ -1,24 +0,0 @@
1
- require 'test/unit'
2
-
3
- #CURRENT_DIR = File.split(File.expand_path(__FILE__))[0]
4
-
5
- #$LOAD_PATH << File.join(CURRENT_DIR, '../lib')
6
-
7
-
8
- require 'pp'
9
-
10
- require 'daemons'
11
-
12
-
13
- class TestMain < Test::Unit::TestCase
14
-
15
- def test_argv_parsing
16
- end
17
-
18
- def test_run
19
- #Daemons.run(File.join(CURRENT_DIR,'testapp.rb'))
20
- end
21
-
22
- end
23
-
24
-
data/test/test1.rb DELETED
@@ -1,19 +0,0 @@
1
-
2
- SCRIPT_DIR = File.split(File.expand_path(__FILE__))[0]
3
-
4
- $LOAD_PATH << File.join(SCRIPT_DIR, '../lib')
5
-
6
-
7
- require 'pp'
8
-
9
- require 'daemons'
10
-
11
-
12
- options = {
13
- :dir_mode => :script,
14
- :dir => 'tmp',
15
- :multiple => true
16
- }
17
-
18
- Daemons.run(File.join(SCRIPT_DIR,'testapp.rb'), options)
19
-
data/test/testapp.rb DELETED
@@ -1,11 +0,0 @@
1
-
2
- require 'pp'
3
-
4
- puts "Application ARGV:"
5
- pp ARGV
6
-
7
-
8
- loop do
9
- sleep(5)
10
- end
11
-