xing-root 0.0.9 → 1.0.0.pre.beta

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8bfb7b7b4166d19c6c5fe669941f7076ce0fd585
4
- data.tar.gz: 9652da335db19a3810ea4275b923c9a9338e68e9
3
+ metadata.gz: 3f01124b913d58e1abb279cf0392130597f8e93f
4
+ data.tar.gz: a01253f57e0351645c709072146dd022a3f187fb
5
5
  SHA512:
6
- metadata.gz: 6269b07939270626845df75f36d74841b1bdb7079087536004a850d82489498f6e5609d6bd73b4ed3e84ff44484a27935a553585f14211e84ecb69650957a54e
7
- data.tar.gz: 847440b52c2b61486e01036103e1c01ef7531cada46f79c86b3aa00bc9cd30e296f78487e840f175afabf60d3c64fb69e18cf7c344fe0e6b9883fcc68a5e4218
6
+ metadata.gz: aa6d5048479bd317f2287c5633542ee28a759769fc31a702ebb395093897017d6f1e8708e97f5be698577367140cc56018b5414c6e49ade9bdf3ff0591f6e1dd
7
+ data.tar.gz: 75efcc6483f10af18e9ee8a7760cf2878c4ea2c9bbeadcb8a7ceec730fe38fd1c7dc5cf18087321c251f0f856b0fd4e59724ee737780fc2409f32c5767b768a7
@@ -3,6 +3,7 @@ class ChildManager
3
3
  @child_pids = []
4
4
  @parent_pid = Process.pid
5
5
  @child_data = {}
6
+ @kill_all_at_exit = false
6
7
  end
7
8
  attr_accessor :child_pids, :child_data
8
9
 
@@ -19,6 +20,10 @@ class ChildManager
19
20
  end
20
21
  puts "#{@parent_pid}: #{name} running in pid #{child_pid}"
21
22
 
23
+ unless @kill_all_at_exit
24
+ at_exit{ kill_all }
25
+ @kill_all_at_exit = true
26
+ end
22
27
  at_exit { kill_child(child_pid) }
23
28
  child_data[child_pid] = ChildRecord.new(name, nil)
24
29
  child_pids << child_pid
@@ -92,7 +97,11 @@ class ChildManager
92
97
  end
93
98
  previous_term_trap = trap "TERM" do
94
99
  puts "Trapped TERM once"
95
- trap "TERM", previous_term_trap
100
+ if previous_term_trap.is_a? Proc and previous_term_trap.source_location.first == __FILE__
101
+ trap "TERM", previous_term_trap
102
+ else
103
+ trap "TERM", "DEFAULT"
104
+ end
96
105
  end
97
106
  Process::kill("TERM", 0)
98
107
  end
@@ -21,6 +21,7 @@ module Xing
21
21
  end
22
22
 
23
23
  def available?
24
+ puts "\n#{__FILE__}:#{__LINE__} => #{:testing_tmux.inspect}"
24
25
  shell.run("which", "tmux").succeeds?
25
26
  end
26
27
  end
@@ -33,12 +33,10 @@ module Xing
33
33
  begin
34
34
  require 'xing/managers/child'
35
35
  require 'xing/managers/tmux'
36
- if Managers::Tmux.available?
36
+ if false # Managers::Tmux.available?
37
37
  Managers::TmuxPane.new
38
38
  else
39
- ChildManager.new.tap do |mngr|
40
- at_exit{ mngr.kill_all }
41
- end
39
+ ChildManager.new
42
40
  end
43
41
  end.tap do |mgr|
44
42
  puts "Using #{mgr.class.name}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xing-root
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 1.0.0.pre.beta
5
5
  platform: ruby
6
6
  authors:
7
7
  - Judson Lester
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-01-20 00:00:00.000000000 Z
12
+ date: 2016-02-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: edict
@@ -101,7 +101,7 @@ rdoc_options:
101
101
  - "--main"
102
102
  - doc/README
103
103
  - "--title"
104
- - xing-root-0.0.9 Documentation
104
+ - xing-root-1.0.0.pre.beta Documentation
105
105
  require_paths:
106
106
  - lib/
107
107
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -116,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
116
  version: '0'
117
117
  requirements: []
118
118
  rubyforge_project: xing-root
119
- rubygems_version: 2.4.3
119
+ rubygems_version: 2.4.8
120
120
  signing_key:
121
121
  specification_version: 4
122
122
  summary: The Root of all Xing