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