win32-process 0.8.3 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Binary file
data.tar.gz.sig DELETED
Binary file
data/CHANGES DELETED
@@ -1,270 +0,0 @@
1
- = 0.8.3 - 16-Dec-2015
2
- * Fixed a declaration in the CreateProcessWithLoginW function prototype. Thanks
3
- go to ksubrama for the spot.
4
- * Only define attach_pfunc if not already defined to avoid potential warnings.
5
-
6
- = 0.8.2 - 15-Oct-2015
7
- * Fixed a declaration bug in the CreateProcess function prototype, and replaced
8
- all instances of :bool with :int in function prototypes, along with
9
- corresponding core code changes. Thanks go to Kartik Null Cating-Subramanian
10
- for the spot.
11
-
12
- = 0.8.1 - 3-Sep-2015
13
- * The gem is now signed.
14
- * Updated Rakefile and gemspec to support signing.
15
- * Added a win32-process.rb stub for your convenience.
16
-
17
- = 0.8.0 - 29-Apr-2015
18
- * Added the Process.snapshot method that lets you gather information for
19
- the heap, threads, modules, and processes.
20
-
21
- = 0.7.5 - 3-Mar-2015
22
- * Use require_relative where possible.
23
- * Fixed a bug in Process.setrlimit. Note that this method has been marked
24
- as experimental until further notice.
25
- * Minor updates to gemspec and Rakefile.
26
- * Added known issue for JRuby and SIGBRK to the README.
27
-
28
- = 0.7.4 - 21-Oct-2013
29
- * Fixed the INVALID_HANDLE_VALUE constant for 64-bit versions of Ruby.
30
- * Added Rake as a development dependency.
31
-
32
- = 0.7.3 - 25-Sep-2013
33
- * Added the Process.get_exitcode method. Thanks go to mthiede for the patch.
34
- * The Process.kill method raises a SecurityError if the $SAFE level is 2
35
- or higher. This was done to match the spec.
36
- * Fixed a bug in our custom Process.uid method that affected 64-bit Ruby.
37
- * A note was added to use the Process.spawn method instead of Process.create
38
- method where practical.
39
-
40
- = 0.7.2 - 8-Apr-2013
41
- * Fixed a 64 bit issue caused by the fact that HANDLE's were set as ulong
42
- instead of intptr_t. Thanks go to Crossverse the spot.
43
- * Added some typedefs in the underlying FFI code for Windows data types.
44
-
45
- = 0.7.1 - 3-Jan-2013
46
- * The _get_errno function is apparently not exported on on Windows XP or
47
- earlier. On those platforms, FFI.errno is now used instead. Thanks go
48
- to Lars Christensen for the report.
49
-
50
- = 0.7.0 - 22-Aug-2012
51
- * Converted to use FFI instead of win32-api.
52
- * Now requires Ruby 1.9.x or later.
53
- * Removed the experimental Process.fork function. This obviated the necessity
54
- of custom implementations of other methods, like Process.waitpid, so those
55
- no longer have custom implementations either. These also proved to be
56
- somewhat problematic with Ruby 1.9.x anyway.
57
- * Removed the custom Process.ppid method because Ruby 1.9.x now supports it.
58
- * The Process.kill method now supports the :exit_proc, :dll_module and
59
- :wait_time options for signals 1 and 4-8.
60
-
61
- = 0.6.5 - 27-Dec-2010
62
- * Fixed getpriority and setpriority so that the underlying process handle is
63
- always closed. Thanks go to Rafal Michalski for the spot and patch.
64
- * Updated getpriority and setpriority so that there are no longer any
65
- default arguments. This now matches the MRI spec.
66
- * Updated Process.create so that illegal options now raise an ArgumentError
67
- instead of a Process::Error.
68
- * Fixed a bug in an error message in the Process.create method where the actual
69
- error message was getting lost.
70
- * Refactored the test suite to use test-unit 2.x features, and make tests a
71
- little more robust in general.
72
-
73
- = 0.6.4 - 13-Nov-2010
74
- * Altered the wait, wait2, waitpid and waitpid2 methods to match the current
75
- MRI interface, i.e. they accept and optional pid and flags, though the
76
- latter is ignored. Thanks go to Robert Wahler for the spot.
77
- * Renamed the example scripts to avoid any potential confusion with actual
78
- test scripts and cleaned them up a bit.
79
- * Added Rake tasks to run the example programs.
80
- * Updated the MANIFEST.
81
-
82
- = 0.6.3 - 9-Nov-2010
83
- * Fixed a bug in the Process.kill method where the remote thread created
84
- was not being properly closed. Thanks go to Ben Nagy for the spot.
85
- * Added the Process.job? method that returns whether or not the current process
86
- is already in a job.
87
- * Added the Process.setrlimit method. Like the Process.getrlimit method it
88
- only supports a limited subset of resources.
89
- * Rakefile tweaks.
90
-
91
- = 0.6.2 - 19-Dec-2009
92
- * Fixed an issue where stdin, stdout and stderr might not be inheritable
93
- even if the inherit option was set. Thanks go to Michael Buselli for the
94
- spot and the patch.
95
- * Added a basic implementation of Process.getrlimit.
96
- * Added the Process.get_affinity method.
97
- * Added test-unit 2.x and sys-proctable as development dependencies.
98
- * Added the :uninstall and :build_gem Rake tasks to the Rakefile.
99
- * Bumped required version of windows-pr to 1.0.6.
100
-
101
- = 0.6.1 - 16-Jul-2009
102
- * Added the Process.uid method. This method returns a user id (really, the RID
103
- of the SID) by default, but can also take an optional parameter to return
104
- a binary SID instead at the user's discretion.
105
- * Added working implementations of Process.getpriority and Process.setpriority.
106
- Note they they only work for processes, not process groups or users.
107
- * Set license to Artistic 2.0, and updated the gemspec.
108
-
109
- = 0.6.0 - 31-Oct-2008
110
- * The mandatory argument for Process.create has been switched from 'app_name'
111
- to 'command_line', to be more in line with underlying CreateProcess API.
112
- Note that 'command_line' will default to 'app_name' if only the latter is
113
- set, but both may be set individually. Keep in mind that 'app_name' must
114
- be a full path to the executable. Thanks go to Jeremy Bopp for the patch.
115
- * Removed the deprecated ProcessError constant. Use Process::Error instead.
116
- * Explicitly include and extend the Windows::Thread module now. Thanks go to
117
- Qi Lu for the spot.
118
- * Slightly more robust internal code handling for some of the other methods,
119
- typically related to ensuring that HANDLE's are closed.
120
- * Example programs are now included with the gem.
121
-
122
- = 0.5.9 - 14-Jun-2008
123
- * Added a proper implementation of Process.ppid.
124
-
125
- = 0.5.8 - 24-Mar-2008
126
- * Fixed a bug in Process.create where the handles in the PROCESS_INFORMATION
127
- struct were not closed, regardless of the 'close_handles' option. Thanks
128
- go to Lars Christensen for the spot and the patch.
129
-
130
- = 0.5.7 - 27-Mar-2008
131
- * Fixed issues with thread_inherit and process_inherit in the Process.create
132
- method. This in turn required an update to windows-pr. Thanks go to Steve
133
- Shreeve for the spot.
134
- * Fixed a potential issue with startf_flags and stdin/stdout/stderr handling.
135
- Thanks again go to Steve Shreeve for the spot and the patch.
136
- * Fixed the code so that it no longer emits redefinition warnings.
137
- * Fixed a bug in the Rake install task (for non-gem installations).
138
-
139
- == 0.5.6 - 13-Mar-2008
140
- * Fixed a bug in the Process.waitpid2 method where it wasn't returning the
141
- proper exit code. Thanks go to Jeremy Bopp for the spot and the patch.
142
- * In the spirit of DWIM, if the 'stdin', 'stdout' or 'stderr' keys are
143
- encountered in the startup_info hash, then the inherit flag is automatically
144
- set to true and the startf_flags key is automatically OR'd with the
145
- STARTF_USESTDHANDLES value. Thanks go to Sander Pool for the inspiration.
146
-
147
- == 0.5.5 - 12-Dec-2007
148
- * The Process.create method now automatically closes the process and thread
149
- handles in the ProcessInfo struct before returning, unless you explicitly
150
- tell it not to via the 'close_handles' option.
151
- * The Process.create method now supports creating a process as another user
152
- via the 'with_logon', 'password' and 'domain' options.
153
-
154
- == 0.5.4 - 23-Nov-2007
155
- * Changed ProcessError to Process::Error.
156
- * Now requires windows-pr 0.7.3 or later because of some reorganization in
157
- that library with regards to thread functions.
158
- * Better cleanup of HANDLE's in a couple methods when failure occurs.
159
- * Added an additional require/include necessitated by a change in the method
160
- organization in the windows-pr library.
161
-
162
- == 0.5.3 - 29-Jul-2007
163
- * Added a Rakefile with tasks for installation and testing.
164
- * Removed the install.rb file (now handled by the Rakefile).
165
- * Updated the README and MANIFEST files.
166
-
167
- == 0.5.2 - 22-Jan-2007
168
- * The startup_info parameter for the Process.create method now accepts
169
- 'stdin', 'stdout', and 'stderr' as valid parameters, which you can pass
170
- a Ruby IO object or a fileno in order to redirect output from the created
171
- process.
172
-
173
- == 0.5.1 - 24-Aug-2006
174
- * Fixed a bug in the Process.create method where the return value for
175
- CreateProcess() was being evaluated incorrectly. Thanks go to David Haney
176
- for the spot.
177
- * Added a slightly nicer error message if an invalid value is passed to the
178
- Process.create method.
179
- * Removed an extraneous '%' character from an error message.
180
-
181
- == 0.5.0 - 29-Jul-2006
182
- * The Process.create method now returns a ProcessInfo struct instead of the
183
- pid. Note that you can still grab the pid out of the struct if needed.
184
- * The Process.create method now allows the process_inherit and
185
- thread_inherit options which determine whether a process or thread
186
- object's handles are inheritable, respectively.
187
- * The wait and wait2 methods will now work if GetProcessId() isn't defined
188
- on your system.
189
- * The 'inherit?' hash option was changed to just 'inherit' (no question mark).
190
- * Minor doc correction - the 'inherit' option defaults to false, not true.
191
-
192
- == 0.4.2 - 29-May-2006
193
- * Fixed a typo/bug in Process.kill for signal 3, where I had accidentally
194
- used CTRL_BRK_EVENT instead of the correct CTRL_BREAK_EVENT. Thanks go
195
- to Luis Lavena for the spot.
196
-
197
- == 0.4.1 - 13-May-2006
198
- * Fixed a bug where spaces in $LOAD_PATH would cause Process.fork to fail.
199
- Thanks go to Justin Bailey for the spot and patch.
200
- * Added a short synopsis to the README file.
201
-
202
- == 0.4.0 - 7-May-2006
203
- * Now pure Ruby, courtesy of the Win32API package.
204
- * Now comes with a gem.
205
- * Modified Process.kill to send a signal to the current process if pid 0
206
- is specified, as per the current 1.8 behavior.
207
- * Process.create now accepts the 'environment' key/value, where you can
208
- pass a semicolon-separated string as the environment for the new process.
209
- * Moved the GUI related options of Process.create to subkeys of the
210
- 'startup_info' key. See documentation for details.
211
- * Replaced Win32::ProcessError with just ProcessError.
212
-
213
- == 0.3.3 - 16-Apr-2006
214
- * Fixed a bug in Process.create with regards to creation_flags. Thanks go
215
- to Tophe Vigny for the spot.
216
-
217
- == 0.3.2 - 12-Aug-2005
218
- * Fixed a bug in Process.kill where a segfault could occur. Thanks go to
219
- Bill Atkins for the spot.
220
- * Changed VERSION to WIN32_PROCESS_VERSION, because it's a module.
221
- * Made the CHANGES, README and doc/process.txt documents rdoc friendly.
222
- * Removed the process.rd file.
223
-
224
- == 0.3.1 - 9-Dec-2004
225
- * Modified Process.fork to return an actual PID instead of a handle. This
226
- means that it should work with Process.kill and other methods that expect
227
- an actual PID.
228
- * Modified Process.kill to understand the strings "SIGINT", "INT", "SIGBRK",
229
- "BRK", "SIGKILL" and "KILL". These correspond to signals 2, 3 and 9,
230
- respectively.
231
- * Added better $LOAD_PATH handling for Process.fork. Thanks go to Aslak
232
- Hellesoy for the spot and the patch.
233
- * Replaced all instances of rb_sys_fail(0) with rb_raise(). This is because
234
- of a strange bug in the Windows Installer that hasn't been nailed down yet.
235
- This means that you can't rescue Errno::ENOENT any more, but will have to
236
- rescue StandardError. This only affects Process.kill.
237
- * The signals that were formerly 1 and 2 and now 2 and 3. I did this because
238
- I wanted the same signal number for SIGINT as it is on *nix.
239
- * Added a test_kill.rb script under the examples directory.
240
- * Other minor cleanup and corrections.
241
-
242
- == 0.3.0 - 25-Jul-2004
243
- * Added the create() method.
244
- * Moved the example programs to doc/examples.
245
- * Updated the docs, and toned down claims of fork's similarity to the Unix
246
- version.
247
- * Minor updates to the test suite.
248
-
249
- == 0.2.1 - 17-May-2004
250
- * Made all methods module functions, except fork, rather than singleton
251
- methods.
252
- * Minor doc changes.
253
-
254
- == 0.2.0 - 11-May-2004
255
- * Removed the Win32 module/namespace. You no longer 'include Win32' and you
256
- no longer need to prefix Process with 'Win32::'.
257
- * The fork() method is now a global function as well as a method of the
258
- Process module. That means you can call 'fork' instead of 'Process.fork'
259
- if you like.
260
- * Doc updates to reflect the above changes.
261
-
262
- == 0.1.1 - 6-Mar-2004
263
- * Fixed bug where spaces in the directory name caused the fork() method to
264
- fail (Park).
265
- * Normalized tc_process.rb somewhat to make it easier to run outside of the
266
- test directory if desired.
267
- * Fixed up tc_process.rb a bit.
268
-
269
- == 0.1.0 - 19-Feb-2004
270
- * Initial release
data/MANIFEST DELETED
@@ -1,15 +0,0 @@
1
- * CHANGES
2
- * README
3
- * MANIFEST
4
- * Rakefile
5
- * win32-process.gemspec
6
- * certs/djberg96_pub.pem
7
- * examples/example_create.rb
8
- * examples/example_kill.rb
9
- * lib/win32-process.rb
10
- * lib/win32/process.rb
11
- * lib/win32/process/constants.rb
12
- * lib/win32/process/functions.rb
13
- * lib/win32/process/helper.rb
14
- * lib/win32/process/structs.rb
15
- * test/test_process.rb
data/README DELETED
@@ -1,78 +0,0 @@
1
- = Description
2
- This library provides analogues of the :getpriority, :setpriority, :getrlimit,
3
- :setrlimit and :uid methods for MS Windows. It also adds the new methods :job?,
4
- :get_affinity, and :create, and redefines the :kill method.
5
-
6
- = Prerequisites
7
- * ffi
8
- * sys-proctable (dev only)
9
- * test-unit 2 (dev only)
10
-
11
- = Supported Platforms
12
- This library is supported on Windows 2000 or later.
13
-
14
- = Installation
15
- gem install win32-process
16
-
17
- = Synopsis
18
- require 'win32/process'
19
-
20
- p Process.job? # => true or false
21
-
22
- info = Process.create(
23
- :app_name => "notepad.exe",
24
- :creation_flags => Process::DETACHED_PROCESS,
25
- :process_inherit => false,
26
- :thread_inherit => true,
27
- :cwd => "C:\\"
28
- )
29
-
30
- p info.process_id
31
-
32
- = Developer's Notes
33
- == Removal of Process.fork in release 0.7.0
34
- The Process.fork method was originally experimental but it has never
35
- been particularly useful in practice. On top of that, it required special
36
- implementations of the Process.waitXXX methods, so it was a maintenance
37
- issue as well.
38
-
39
- With Ruby 1.9 now becoming standard and its addition of Process.spawn
40
- and friends (and concomitant support for the Process.waitXXX methods) I
41
- felt it was time to remove it.
42
-
43
- You can still simulate Process.fork if you like using Process.create, which
44
- is how it was implemented internally anyway. A better solution might be
45
- to follow in the footsteps of ActiveState Perl, which uses native threads
46
- to simulate fork on Windows.
47
-
48
- == Changes in the custom Process.kill method for 0.7.0
49
- The Process.kill method in 0.7.0 more closely matches the spec now, but
50
- the internal method for killing processes is still nicer for most signals.
51
- With the release of 0.7.0 users can now specify options that provide finer
52
- control over how a process is killed. See the documentation for details.
53
-
54
- == The removal of the custom Process.ppid method
55
- This was added at some point in the Ruby 1.9 dev cycle so it was removed
56
- from this library.
57
-
58
- = Known Issues
59
- JRuby doesn't seem to like SIGBRK for Process.kill.
60
-
61
- Any issues or bugs should be reported on the project page at
62
- https://github.com/djberg96/win32-process.
63
-
64
- = License
65
- Artistic 2.0
66
-
67
- = Copyright
68
- (C) 2003-2015 Daniel J. Berger
69
- All Rights Reserved
70
-
71
- = Warranty
72
- This library is provided "as is" and without any express or
73
- implied warranties, including, without limitation, the implied
74
- warranties of merchantability and fitness for a particular purpose.
75
-
76
- = Author(s)
77
- Park Heesob
78
- Daniel J. Berger
data/Rakefile DELETED
@@ -1,60 +0,0 @@
1
- require 'rake'
2
- require 'rake/clean'
3
- require 'rake/testtask'
4
- require 'rbconfig'
5
- include RbConfig
6
-
7
- CLEAN.include('**/*.gem', '**/*.rbc', '**/*.log')
8
-
9
- namespace :gem do
10
- desc 'Create the win32-process gem'
11
- task :create => [:clean] do
12
- require 'rubygems/package'
13
- spec = eval(IO.read('win32-process.gemspec'))
14
- spec.signing_key = File.join(Dir.home, '.ssh', 'gem-private_key.pem')
15
- Gem::Package.build(spec, true)
16
- end
17
-
18
- desc 'Install the win32-process gem'
19
- task :install => [:create] do
20
- file = Dir["*.gem"].first
21
- sh "gem install -l #{file}"
22
- end
23
- end
24
-
25
- namespace :example do
26
- desc 'Run the fork + wait example'
27
- task :fork_wait do
28
- sh "ruby -Ilib examples/example_fork_wait.rb"
29
- end
30
-
31
- desc 'Run the fork + waitpid example'
32
- task :fork_waitpid do
33
- sh "ruby -Ilib examples/example_fork_waitpid.rb"
34
- end
35
-
36
- desc 'Run the kill example'
37
- task :kill do
38
- sh "ruby -Ilib examples/example_kill.rb"
39
- end
40
-
41
- desc 'Run the create example'
42
- task :create do
43
- sh "ruby -Ilib examples/example_create.rb"
44
- end
45
- end
46
-
47
- namespace :test do
48
- Rake::TestTask.new(:kill) do |t|
49
- t.verbose = true
50
- t.warning = true
51
- t.test_files = FileList['test/test_win32_process_kill.rb']
52
- end
53
- end
54
-
55
- Rake::TestTask.new do |t|
56
- t.verbose = true
57
- t.warning = true
58
- end
59
-
60
- task :default => :test
@@ -1,21 +0,0 @@
1
- -----BEGIN CERTIFICATE-----
2
- MIIDcDCCAligAwIBAgIBATANBgkqhkiG9w0BAQUFADA/MREwDwYDVQQDDAhkamJl
3
- cmc5NjEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPyLGQBGRYDY29t
4
- MB4XDTE1MDkwMjIwNDk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