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.
@@ -1,35 +0,0 @@
1
- ##########################################################################
2
- # example_create.rb
3
- #
4
- # Simple test program for the Process.create() method. You can run this
5
- # code via the 'example:create' task.
6
- ##########################################################################
7
- require "win32/process"
8
-
9
- p Process::WIN32_PROCESS_VERSION
10
-
11
- struct = Process.create(
12
- :app_name => "notepad.exe",
13
- :creation_flags => Process::DETACHED_PROCESS,
14
- :process_inherit => false,
15
- :thread_inherit => true,
16
- :cwd => "C:\\",
17
- :inherit => true,
18
- :environment => "SYSTEMROOT=#{ENV['SYSTEMROOT']};PATH=C:\\"
19
- )
20
-
21
- p struct
22
-
23
- =begin
24
- # Don't run this from an existing terminal
25
- pid = Process.create(
26
- :app_name => "cmd.exe",
27
- :creation_flags => Process::DETACHED_PROCESS,
28
- :startf_flags => Process::USEPOSITION,
29
- :x => 0,
30
- :y => 0,
31
- :title => "Hi Dan"
32
- )
33
-
34
- puts "Pid of new process: #{pid}"
35
- =end
@@ -1,34 +0,0 @@
1
- ##########################################################################
2
- # example_kill.rb
3
- #
4
- # Generic test script for futzing around Process.kill. This script
5
- # requires the sys-proctable library.
6
- #
7
- # You can run this example via the 'example:kill' task.
8
- ##########################################################################
9
- require "win32/process"
10
-
11
- begin
12
- require "sys/proctable"
13
- rescue LoadError
14
- STDERR.puts "Whoa there!"
15
- STDERR.puts "This script requires the sys-proctable package to work."
16
- STDERR.puts "You can find it at http://ruby-sysutils.sf.net"
17
- STDERR.puts "Exiting..."
18
- exit
19
- end
20
-
21
- include Sys
22
-
23
- puts "VERSION: " + Process::WIN32_PROCESS_VERSION
24
-
25
- IO.popen("notepad")
26
- sleep 1 # Give it a chance to start before checking for its pid
27
-
28
- pids = []
29
-
30
- ProcTable.ps{ |s|
31
- pids.push(s.pid) if s.cmdline =~ /notepad/i
32
- }
33
-
34
- p Process.kill(9,pids.last)
metadata.gz.sig DELETED
@@ -1,2 +0,0 @@
1
- <8 '$�ӡ���ʳ�����K�w�.�)��@�3���J��y���i��c����>�-AzP�qŖ+[�����
2
- �(b�0�2O y�D[������"��)��A��wj(a�z��ev:Y�a!��r�53J�G�m�KFʏE�: �_��2�Ў���۾GU�-��&KDY��(�X�T�^�8-P8�