win32-ipc 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGES +6 -0
- data/MANIFEST +1 -1
- data/README +3 -3
- data/Rakefile +8 -1
- data/lib/win32/ipc.rb +6 -5
- data/test/tc_ipc.rb +1 -1
- data/win32-ipc.gemspec +1 -1
- metadata +51 -45
- data/install.rb +0 -11
data/CHANGES
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
== 0.5.1 - 1-Jan-2008
|
2
|
+
* Fixed bugs in the private wait_for_multiple method. Thanks go to an
|
3
|
+
anonymous user for the spot and the patch.
|
4
|
+
* Removed the install.rb file. Installation was merged into the Rakefile.
|
5
|
+
* Updated the MANIFEST.
|
6
|
+
|
1
7
|
== 0.5.0 - 30-Apr-2007
|
2
8
|
* Now pure Ruby.
|
3
9
|
* Ipc.new no longer accepts a block.
|
data/MANIFEST
CHANGED
data/README
CHANGED
@@ -10,19 +10,19 @@ There is no synopsis. Don't use this module directly. It is used as the basis
|
|
10
10
|
for other packages, such as win32-mutex, etc.
|
11
11
|
|
12
12
|
= Notes
|
13
|
-
|
13
|
+
Originally based on the Win32::Ipc Perl module by Gurusamy Sarathy.
|
14
14
|
|
15
15
|
This package is a prerequisite for several other IPC related Windows packages.
|
16
16
|
|
17
17
|
= Known Bugs
|
18
|
-
None that I know of.
|
18
|
+
None that I know of. Please log any other bug reports on the RubyForge
|
19
19
|
project page at http://www.rubyforge.net/projects/win32utils
|
20
20
|
|
21
21
|
= License
|
22
22
|
Ruby's
|
23
23
|
|
24
24
|
= Copyright
|
25
|
-
(C) 2003-
|
25
|
+
(C) 2003-2008 Daniel J. Berger, All Rights Reserved
|
26
26
|
|
27
27
|
= Warranty
|
28
28
|
This package is provided "as is" and without any express or
|
data/Rakefile
CHANGED
@@ -1,9 +1,16 @@
|
|
1
1
|
require 'rake'
|
2
2
|
require 'rake/testtask'
|
3
|
+
require 'rbconfig'
|
4
|
+
include Config
|
3
5
|
|
4
6
|
desc 'Install the win32-ipc package (non-gem)'
|
5
7
|
task :install do
|
6
|
-
|
8
|
+
sitelibdir = CONFIG['sitelibdir']
|
9
|
+
installdir = File.join(sitelibdir, 'win32')
|
10
|
+
file = File.join('lib', 'win32', 'ipc.rb')
|
11
|
+
|
12
|
+
Dir.mkdir(installdir) unless File.exists?(installdir)
|
13
|
+
FileUtils.cp(file, installdir, :verbose => true)
|
7
14
|
end
|
8
15
|
|
9
16
|
Rake::TestTask.new do |t|
|
data/lib/win32/ipc.rb
CHANGED
@@ -14,7 +14,7 @@ module Win32
|
|
14
14
|
|
15
15
|
class Error < StandardError; end
|
16
16
|
|
17
|
-
VERSION = '0.5.
|
17
|
+
VERSION = '0.5.1'
|
18
18
|
|
19
19
|
SIGNALED = 1
|
20
20
|
ABANDONED = -1
|
@@ -125,20 +125,21 @@ module Win32
|
|
125
125
|
raise Error, 'no objects to wait for'
|
126
126
|
end
|
127
127
|
|
128
|
-
|
128
|
+
handles = ipc_objects.map{ |o| o.handle }
|
129
|
+
wait = WaitForMultipleObjects(length, handles.pack('L*'), wait_all, timeout)
|
129
130
|
|
130
131
|
if wait == WAIT_FAILED
|
131
132
|
raise Error, get_last_error
|
132
133
|
end
|
133
134
|
|
134
135
|
# signaled
|
135
|
-
if (wait
|
136
|
+
if (wait >= WAIT_OBJECT_0) && (wait < WAIT_OBJECT_0 + length)
|
136
137
|
return wait - WAIT_OBJECT_0 + 1
|
137
138
|
end
|
138
139
|
|
139
140
|
# abandoned mutex - return negative value
|
140
|
-
if (wait >=
|
141
|
-
return -wait -
|
141
|
+
if (wait >= WAIT_ABANDONED) && (wait < WAIT_ABANDONED + length)
|
142
|
+
return -wait - WAIT_ABANDONED + 1
|
142
143
|
end
|
143
144
|
|
144
145
|
# timed out
|
data/test/tc_ipc.rb
CHANGED
data/win32-ipc.gemspec
CHANGED
metadata
CHANGED
@@ -1,67 +1,73 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.0.8
|
3
|
-
specification_version: 1
|
4
2
|
name: win32-ipc
|
5
3
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.5.
|
7
|
-
date: 2007-04-30 00:00:00 -06:00
|
8
|
-
summary: An abstract base class for Windows synchronization objects.
|
9
|
-
require_paths:
|
10
|
-
- lib
|
11
|
-
email: djberg96@gmail.com
|
12
|
-
homepage: http://www.rubyforge.org/projects/win32utils
|
13
|
-
rubyforge_project:
|
14
|
-
description: An abstract base class for Windows synchronization objects.
|
15
|
-
autorequire:
|
16
|
-
default_executable:
|
17
|
-
bindir: bin
|
18
|
-
has_rdoc: true
|
19
|
-
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
|
-
requirements:
|
21
|
-
- - ">"
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 0.0.0
|
24
|
-
version:
|
4
|
+
version: 0.5.1
|
25
5
|
platform: ruby
|
26
|
-
signing_key:
|
27
|
-
cert_chain:
|
28
|
-
post_install_message:
|
29
6
|
authors:
|
30
7
|
- Daniel J. Berger
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2008-01-01 00:00:00 -07:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: windows-pr
|
17
|
+
version_requirement:
|
18
|
+
version_requirements: !ruby/object:Gem::Requirement
|
19
|
+
requirements:
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 0.6.0
|
23
|
+
version:
|
24
|
+
description: An abstract base class for Windows synchronization objects.
|
25
|
+
email: djberg96@gmail.com
|
26
|
+
executables: []
|
27
|
+
|
28
|
+
extensions: []
|
29
|
+
|
30
|
+
extra_rdoc_files:
|
31
|
+
- README
|
32
|
+
- CHANGES
|
33
|
+
- MANIFEST
|
31
34
|
files:
|
32
35
|
- lib/win32/ipc.rb
|
33
36
|
- test/CVS
|
34
37
|
- test/tc_ipc.rb
|
35
38
|
- CHANGES
|
36
39
|
- CVS
|
37
|
-
- install.rb
|
38
40
|
- lib
|
39
41
|
- MANIFEST
|
40
42
|
- Rakefile
|
41
43
|
- README
|
42
44
|
- test
|
43
45
|
- win32-ipc.gemspec
|
44
|
-
|
45
|
-
|
46
|
+
has_rdoc: true
|
47
|
+
homepage: http://www.rubyforge.org/projects/win32utils
|
48
|
+
post_install_message:
|
46
49
|
rdoc_options: []
|
47
50
|
|
48
|
-
|
49
|
-
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
51
|
+
require_paths:
|
52
|
+
- lib
|
53
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
54
|
+
requirements:
|
55
|
+
- - ">="
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: "0"
|
58
|
+
version:
|
59
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - ">="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: "0"
|
64
|
+
version:
|
56
65
|
requirements: []
|
57
66
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
version: 0.6.0
|
67
|
-
version:
|
67
|
+
rubyforge_project:
|
68
|
+
rubygems_version: 1.0.1
|
69
|
+
signing_key:
|
70
|
+
specification_version: 2
|
71
|
+
summary: An abstract base class for Windows synchronization objects.
|
72
|
+
test_files:
|
73
|
+
- test/tc_ipc.rb
|
data/install.rb
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
# For those who don't like gems...
|
2
|
-
require 'rbconfig'
|
3
|
-
require 'fileutils'
|
4
|
-
include Config
|
5
|
-
|
6
|
-
sitelibdir = CONFIG['sitelibdir']
|
7
|
-
installdir = sitelibdir + '/win32'
|
8
|
-
file = 'lib\win32\ipc.rb'
|
9
|
-
|
10
|
-
Dir.mkdir(installdir) unless File.exists?(installdir)
|
11
|
-
FileUtils.cp(file, installdir, :verbose => true)
|