win32-process 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +226 -221
- data/MANIFEST +9 -9
- data/README +76 -76
- data/Rakefile +58 -58
- data/examples/example_create.rb +35 -35
- data/examples/example_kill.rb +34 -34
- data/lib/win32/process.rb +894 -881
- data/lib/win32/process/constants.rb +105 -105
- data/lib/win32/process/functions.rb +72 -66
- data/lib/win32/process/helper.rb +13 -13
- data/lib/win32/process/structs.rb +114 -103
- data/test/test_win32_process.rb +319 -319
- data/test/test_win32_process_kill.rb +144 -144
- data/win32-process.gemspec +27 -27
- metadata +2 -2
data/CHANGES
CHANGED
@@ -1,221 +1,226 @@
|
|
1
|
-
= 0.7.
|
2
|
-
*
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
*
|
9
|
-
*
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
*
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
*
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
*
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
*
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
*
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
* Added
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
*
|
59
|
-
|
60
|
-
|
61
|
-
*
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
*
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
*
|
72
|
-
|
73
|
-
|
74
|
-
*
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
= 0.5.
|
82
|
-
* Fixed
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
* Fixed
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
*
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
*
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
*
|
115
|
-
*
|
116
|
-
|
117
|
-
|
118
|
-
== 0.5.
|
119
|
-
*
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
*
|
131
|
-
|
132
|
-
|
133
|
-
*
|
134
|
-
|
135
|
-
*
|
136
|
-
|
137
|
-
|
138
|
-
* The
|
139
|
-
|
140
|
-
* The
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
== 0.4.
|
149
|
-
* Fixed a bug
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
== 0.4.
|
154
|
-
*
|
155
|
-
|
156
|
-
*
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
*
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
*
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
*
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
*
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
*
|
196
|
-
*
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
*
|
202
|
-
|
203
|
-
* Minor
|
204
|
-
|
205
|
-
== 0.2.
|
206
|
-
*
|
207
|
-
|
208
|
-
*
|
209
|
-
|
210
|
-
|
211
|
-
*
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
*
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
*
|
1
|
+
= 0.7.1 - 3-Jan-2013
|
2
|
+
* The _get_errno function is apparently not exported on on Windows XP or
|
3
|
+
earlier. On those platforms, FFI.errno is now used instead. Thanks go
|
4
|
+
to Lars Christensen for the report.
|
5
|
+
|
6
|
+
= 0.7.0 - 22-Aug-2012
|
7
|
+
* Converted to use FFI instead of win32-api.
|
8
|
+
* Now requires Ruby 1.9.x or later.
|
9
|
+
* Removed the experimental Process.fork function. This obviated the necessity
|
10
|
+
of custom implementations of other methods, like Process.waitpid, so those
|
11
|
+
no longer have custom implementations either. These also proved to be
|
12
|
+
somewhat problematic with Ruby 1.9.x anyway.
|
13
|
+
* Removed the custom Process.ppid method because Ruby 1.9.x now supports it.
|
14
|
+
* The Process.kill method now supports the :exit_proc, :dll_module and
|
15
|
+
:wait_time options for signals 1 and 4-8.
|
16
|
+
|
17
|
+
= 0.6.5 - 27-Dec-2010
|
18
|
+
* Fixed getpriority and setpriority so that the underlying process handle is
|
19
|
+
always closed. Thanks go to Rafal Michalski for the spot and patch.
|
20
|
+
* Updated getpriority and setpriority so that there are no longer any
|
21
|
+
default arguments. This now matches the MRI spec.
|
22
|
+
* Updated Process.create so that illegal options now raise an ArgumentError
|
23
|
+
instead of a Process::Error.
|
24
|
+
* Fixed a bug in an error message in the Process.create method where the actual
|
25
|
+
error message was getting lost.
|
26
|
+
* Refactored the test suite to use test-unit 2.x features, and make tests a
|
27
|
+
little more robust in general.
|
28
|
+
|
29
|
+
= 0.6.4 - 13-Nov-2010
|
30
|
+
* Altered the wait, wait2, waitpid and waitpid2 methods to match the current
|
31
|
+
MRI interface, i.e. they accept and optional pid and flags, though the
|
32
|
+
latter is ignored. Thanks go to Robert Wahler for the spot.
|
33
|
+
* Renamed the example scripts to avoid any potential confusion with actual
|
34
|
+
test scripts and cleaned them up a bit.
|
35
|
+
* Added Rake tasks to run the example programs.
|
36
|
+
* Updated the MANIFEST.
|
37
|
+
|
38
|
+
= 0.6.3 - 9-Nov-2010
|
39
|
+
* Fixed a bug in the Process.kill method where the remote thread created
|
40
|
+
was not being properly closed. Thanks go to Ben Nagy for the spot.
|
41
|
+
* Added the Process.job? method that returns whether or not the current process
|
42
|
+
is already in a job.
|
43
|
+
* Added the Process.setrlimit method. Like the Process.getrlimit method it
|
44
|
+
only supports a limited subset of resources.
|
45
|
+
* Rakefile tweaks.
|
46
|
+
|
47
|
+
= 0.6.2 - 19-Dec-2009
|
48
|
+
* Fixed an issue where stdin, stdout and stderr might not be inheritable
|
49
|
+
even if the inherit option was set. Thanks go to Michael Buselli for the
|
50
|
+
spot and the patch.
|
51
|
+
* Added a basic implementation of Process.getrlimit.
|
52
|
+
* Added the Process.get_affinity method.
|
53
|
+
* Added test-unit 2.x and sys-proctable as development dependencies.
|
54
|
+
* Added the :uninstall and :build_gem Rake tasks to the Rakefile.
|
55
|
+
* Bumped required version of windows-pr to 1.0.6.
|
56
|
+
|
57
|
+
= 0.6.1 - 16-Jul-2009
|
58
|
+
* Added the Process.uid method. This method returns a user id (really, the RID
|
59
|
+
of the SID) by default, but can also take an optional parameter to return
|
60
|
+
a binary SID instead at the user's discretion.
|
61
|
+
* Added working implementations of Process.getpriority and Process.setpriority.
|
62
|
+
Note they they only work for processes, not process groups or users.
|
63
|
+
* Set license to Artistic 2.0, and updated the gemspec.
|
64
|
+
|
65
|
+
= 0.6.0 - 31-Oct-2008
|
66
|
+
* The mandatory argument for Process.create has been switched from 'app_name'
|
67
|
+
to 'command_line', to be more in line with underlying CreateProcess API.
|
68
|
+
Note that 'command_line' will default to 'app_name' if only the latter is
|
69
|
+
set, but both may be set individually. Keep in mind that 'app_name' must
|
70
|
+
be a full path to the executable. Thanks go to Jeremy Bopp for the patch.
|
71
|
+
* Removed the deprecated ProcessError constant. Use Process::Error instead.
|
72
|
+
* Explicitly include and extend the Windows::Thread module now. Thanks go to
|
73
|
+
Qi Lu for the spot.
|
74
|
+
* Slightly more robust internal code handling for some of the other methods,
|
75
|
+
typically related to ensuring that HANDLE's are closed.
|
76
|
+
* Example programs are now included with the gem.
|
77
|
+
|
78
|
+
= 0.5.9 - 14-Jun-2008
|
79
|
+
* Added a proper implementation of Process.ppid.
|
80
|
+
|
81
|
+
= 0.5.8 - 24-Mar-2008
|
82
|
+
* Fixed a bug in Process.create where the handles in the PROCESS_INFORMATION
|
83
|
+
struct were not closed, regardless of the 'close_handles' option. Thanks
|
84
|
+
go to Lars Christensen for the spot and the patch.
|
85
|
+
|
86
|
+
= 0.5.7 - 27-Mar-2008
|
87
|
+
* Fixed issues with thread_inherit and process_inherit in the Process.create
|
88
|
+
method. This in turn required an update to windows-pr. Thanks go to Steve
|
89
|
+
Shreeve for the spot.
|
90
|
+
* Fixed a potential issue with startf_flags and stdin/stdout/stderr handling.
|
91
|
+
Thanks again go to Steve Shreeve for the spot and the patch.
|
92
|
+
* Fixed the code so that it no longer emits redefinition warnings.
|
93
|
+
* Fixed a bug in the Rake install task (for non-gem installations).
|
94
|
+
|
95
|
+
== 0.5.6 - 13-Mar-2008
|
96
|
+
* Fixed a bug in the Process.waitpid2 method where it wasn't returning the
|
97
|
+
proper exit code. Thanks go to Jeremy Bopp for the spot and the patch.
|
98
|
+
* In the spirit of DWIM, if the 'stdin', 'stdout' or 'stderr' keys are
|
99
|
+
encountered in the startup_info hash, then the inherit flag is automatically
|
100
|
+
set to true and the startf_flags key is automatically OR'd with the
|
101
|
+
STARTF_USESTDHANDLES value. Thanks go to Sander Pool for the inspiration.
|
102
|
+
|
103
|
+
== 0.5.5 - 12-Dec-2007
|
104
|
+
* The Process.create method now automatically closes the process and thread
|
105
|
+
handles in the ProcessInfo struct before returning, unless you explicitly
|
106
|
+
tell it not to via the 'close_handles' option.
|
107
|
+
* The Process.create method now supports creating a process as another user
|
108
|
+
via the 'with_logon', 'password' and 'domain' options.
|
109
|
+
|
110
|
+
== 0.5.4 - 23-Nov-2007
|
111
|
+
* Changed ProcessError to Process::Error.
|
112
|
+
* Now requires windows-pr 0.7.3 or later because of some reorganization in
|
113
|
+
that library with regards to thread functions.
|
114
|
+
* Better cleanup of HANDLE's in a couple methods when failure occurs.
|
115
|
+
* Added an additional require/include necessitated by a change in the method
|
116
|
+
organization in the windows-pr library.
|
117
|
+
|
118
|
+
== 0.5.3 - 29-Jul-2007
|
119
|
+
* Added a Rakefile with tasks for installation and testing.
|
120
|
+
* Removed the install.rb file (now handled by the Rakefile).
|
121
|
+
* Updated the README and MANIFEST files.
|
122
|
+
|
123
|
+
== 0.5.2 - 22-Jan-2007
|
124
|
+
* The startup_info parameter for the Process.create method now accepts
|
125
|
+
'stdin', 'stdout', and 'stderr' as valid parameters, which you can pass
|
126
|
+
a Ruby IO object or a fileno in order to redirect output from the created
|
127
|
+
process.
|
128
|
+
|
129
|
+
== 0.5.1 - 24-Aug-2006
|
130
|
+
* Fixed a bug in the Process.create method where the return value for
|
131
|
+
CreateProcess() was being evaluated incorrectly. Thanks go to David Haney
|
132
|
+
for the spot.
|
133
|
+
* Added a slightly nicer error message if an invalid value is passed to the
|
134
|
+
Process.create method.
|
135
|
+
* Removed an extraneous '%' character from an error message.
|
136
|
+
|
137
|
+
== 0.5.0 - 29-Jul-2006
|
138
|
+
* The Process.create method now returns a ProcessInfo struct instead of the
|
139
|
+
pid. Note that you can still grab the pid out of the struct if needed.
|
140
|
+
* The Process.create method now allows the process_inherit and
|
141
|
+
thread_inherit options which determine whether a process or thread
|
142
|
+
object's handles are inheritable, respectively.
|
143
|
+
* The wait and wait2 methods will now work if GetProcessId() isn't defined
|
144
|
+
on your system.
|
145
|
+
* The 'inherit?' hash option was changed to just 'inherit' (no question mark).
|
146
|
+
* Minor doc correction - the 'inherit' option defaults to false, not true.
|
147
|
+
|
148
|
+
== 0.4.2 - 29-May-2006
|
149
|
+
* Fixed a typo/bug in Process.kill for signal 3, where I had accidentally
|
150
|
+
used CTRL_BRK_EVENT instead of the correct CTRL_BREAK_EVENT. Thanks go
|
151
|
+
to Luis Lavena for the spot.
|
152
|
+
|
153
|
+
== 0.4.1 - 13-May-2006
|
154
|
+
* Fixed a bug where spaces in $LOAD_PATH would cause Process.fork to fail.
|
155
|
+
Thanks go to Justin Bailey for the spot and patch.
|
156
|
+
* Added a short synopsis to the README file.
|
157
|
+
|
158
|
+
== 0.4.0 - 7-May-2006
|
159
|
+
* Now pure Ruby, courtesy of the Win32API package.
|
160
|
+
* Now comes with a gem.
|
161
|
+
* Modified Process.kill to send a signal to the current process if pid 0
|
162
|
+
is specified, as per the current 1.8 behavior.
|
163
|
+
* Process.create now accepts the 'environment' key/value, where you can
|
164
|
+
pass a semicolon-separated string as the environment for the new process.
|
165
|
+
* Moved the GUI related options of Process.create to subkeys of the
|
166
|
+
'startup_info' key. See documentation for details.
|
167
|
+
* Replaced Win32::ProcessError with just ProcessError.
|
168
|
+
|
169
|
+
== 0.3.3 - 16-Apr-2006
|
170
|
+
* Fixed a bug in Process.create with regards to creation_flags. Thanks go
|
171
|
+
to Tophe Vigny for the spot.
|
172
|
+
|
173
|
+
== 0.3.2 - 12-Aug-2005
|
174
|
+
* Fixed a bug in Process.kill where a segfault could occur. Thanks go to
|
175
|
+
Bill Atkins for the spot.
|
176
|
+
* Changed VERSION to WIN32_PROCESS_VERSION, because it's a module.
|
177
|
+
* Made the CHANGES, README and doc/process.txt documents rdoc friendly.
|
178
|
+
* Removed the process.rd file.
|
179
|
+
|
180
|
+
== 0.3.1 - 9-Dec-2004
|
181
|
+
* Modified Process.fork to return an actual PID instead of a handle. This
|
182
|
+
means that it should work with Process.kill and other methods that expect
|
183
|
+
an actual PID.
|
184
|
+
* Modified Process.kill to understand the strings "SIGINT", "INT", "SIGBRK",
|
185
|
+
"BRK", "SIGKILL" and "KILL". These correspond to signals 2, 3 and 9,
|
186
|
+
respectively.
|
187
|
+
* Added better $LOAD_PATH handling for Process.fork. Thanks go to Aslak
|
188
|
+
Hellesoy for the spot and the patch.
|
189
|
+
* Replaced all instances of rb_sys_fail(0) with rb_raise(). This is because
|
190
|
+
of a strange bug in the Windows Installer that hasn't been nailed down yet.
|
191
|
+
This means that you can't rescue Errno::ENOENT any more, but will have to
|
192
|
+
rescue StandardError. This only affects Process.kill.
|
193
|
+
* The signals that were formerly 1 and 2 and now 2 and 3. I did this because
|
194
|
+
I wanted the same signal number for SIGINT as it is on *nix.
|
195
|
+
* Added a test_kill.rb script under the examples directory.
|
196
|
+
* Other minor cleanup and corrections.
|
197
|
+
|
198
|
+
== 0.3.0 - 25-Jul-2004
|
199
|
+
* Added the create() method.
|
200
|
+
* Moved the example programs to doc/examples.
|
201
|
+
* Updated the docs, and toned down claims of fork's similarity to the Unix
|
202
|
+
version.
|
203
|
+
* Minor updates to the test suite.
|
204
|
+
|
205
|
+
== 0.2.1 - 17-May-2004
|
206
|
+
* Made all methods module functions, except fork, rather than singleton
|
207
|
+
methods.
|
208
|
+
* Minor doc changes.
|
209
|
+
|
210
|
+
== 0.2.0 - 11-May-2004
|
211
|
+
* Removed the Win32 module/namespace. You no longer 'include Win32' and you
|
212
|
+
no longer need to prefix Process with 'Win32::'.
|
213
|
+
* The fork() method is now a global function as well as a method of the
|
214
|
+
Process module. That means you can call 'fork' instead of 'Process.fork'
|
215
|
+
if you like.
|
216
|
+
* Doc updates to reflect the above changes.
|
217
|
+
|
218
|
+
== 0.1.1 - 6-Mar-2004
|
219
|
+
* Fixed bug where spaces in the directory name caused the fork() method to
|
220
|
+
fail (Park).
|
221
|
+
* Normalized tc_process.rb somewhat to make it easier to run outside of the
|
222
|
+
test directory if desired.
|
223
|
+
* Fixed up tc_process.rb a bit.
|
224
|
+
|
225
|
+
== 0.1.0 - 19-Feb-2004
|
226
|
+
* Initial release
|
data/MANIFEST
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
* CHANGES
|
2
|
-
* README
|
3
|
-
* MANIFEST
|
4
|
-
* Rakefile
|
5
|
-
* win32-process.gemspec
|
6
|
-
* examples/example_create.rb
|
7
|
-
* examples/example_kill.rb
|
8
|
-
* lib/win32/process.rb
|
9
|
-
* test/test_process.rb
|
1
|
+
* CHANGES
|
2
|
+
* README
|
3
|
+
* MANIFEST
|
4
|
+
* Rakefile
|
5
|
+
* win32-process.gemspec
|
6
|
+
* examples/example_create.rb
|
7
|
+
* examples/example_kill.rb
|
8
|
+
* lib/win32/process.rb
|
9
|
+
* test/test_process.rb
|