sys-proctable 0.9.2-universal-darwin → 0.9.3-universal-darwin
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +5 -0
- data/Rakefile +13 -2
- data/ext/darwin/sys/proctable.c +9 -3
- data/sys-proctable.gemspec +1 -1
- data/test/test_sys_proctable_all.rb +1 -1
- metadata +3 -3
data/CHANGES
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
== 0.9.3 - 17-Mar-2013
|
2
|
+
* Fixed a bug on OSX where a long command string arg could cause
|
3
|
+
a segfault. Thanks go to Nathaniel Bibler for the spot.
|
4
|
+
* Changed the gem platform from mingw to mingw32 for Windows.
|
5
|
+
|
1
6
|
== 0.9.2 - 8-Oct-2012
|
2
7
|
* Added cmdline support for OS X. Thanks go to Matthias Zirnstein for
|
3
8
|
the patch.
|
data/Rakefile
CHANGED
@@ -18,20 +18,31 @@ CLEAN.include(
|
|
18
18
|
|
19
19
|
desc 'Build the sys-proctable library for C versions of sys-proctable'
|
20
20
|
task :build => [:clean] do
|
21
|
+
if RUBY_PLATFORM == 'java'
|
22
|
+
if ENV['JRUBY_OPTS']
|
23
|
+
ENV['JRUBY_OPTS'] += ' -Xcext.enabled=true'
|
24
|
+
else
|
25
|
+
ENV['JRUBY_OPTS'] = '-Xcext.enabled=true'
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
21
29
|
case CONFIG['host_os']
|
22
30
|
when /bsd/i
|
23
31
|
dir = 'ext/bsd'
|
32
|
+
ext = '.so'
|
24
33
|
when /darwin/i
|
25
34
|
dir = 'ext/darwin'
|
35
|
+
ext = '.bundle'
|
26
36
|
when /hpux/i
|
27
37
|
dir = 'ext/hpux'
|
38
|
+
ext = '.sl'
|
28
39
|
end
|
29
40
|
|
30
41
|
unless CONFIG['host_os'] =~ /win32|mswin|dos|cygwin|mingw|windows|linux|sunos|solaris/i
|
31
42
|
Dir.chdir(dir) do
|
32
43
|
ruby 'extconf.rb'
|
33
44
|
sh 'make'
|
34
|
-
cp 'proctable
|
45
|
+
cp 'proctable' + ext, 'sys'
|
35
46
|
end
|
36
47
|
end
|
37
48
|
end
|
@@ -152,7 +163,7 @@ namespace :gem do
|
|
152
163
|
spec.files += ['lib/sunos/sys/proctable.rb']
|
153
164
|
spec.test_files << 'test/test_sys_proctable_sunos.rb'
|
154
165
|
when /mswin|win32|dos|cygwin|mingw|windows/i
|
155
|
-
spec.platform = Gem::Platform.new(['universal', '
|
166
|
+
spec.platform = Gem::Platform.new(['universal', 'mingw32'])
|
156
167
|
spec.require_paths = ['lib', 'lib/windows']
|
157
168
|
spec.files += ['lib/windows/sys/proctable.rb']
|
158
169
|
spec.test_files << 'test/test_sys_proctable_windows.rb'
|
data/ext/darwin/sys/proctable.c
CHANGED
@@ -16,13 +16,19 @@
|
|
16
16
|
#include <stdio.h>
|
17
17
|
#include <stdlib.h>
|
18
18
|
#include <string.h>
|
19
|
+
#include <unistd.h>
|
20
|
+
|
19
21
|
#define pid_of(pproc) pproc->kp_proc.p_pid
|
20
22
|
|
21
|
-
#define SYS_PROCTABLE_VERSION "0.9.
|
23
|
+
#define SYS_PROCTABLE_VERSION "0.9.3"
|
22
24
|
|
23
25
|
#define PROC_MIB_LEN 4
|
24
26
|
#define ARGS_MIB_LEN 3
|
25
|
-
|
27
|
+
|
28
|
+
#ifndef ARGS_MAX_LEN
|
29
|
+
#define ARGS_MAX_LEN sysconf(_SC_ARG_MAX)
|
30
|
+
#endif
|
31
|
+
|
26
32
|
VALUE cProcTableError, sProcStruct;
|
27
33
|
|
28
34
|
const char* fields[] = {
|
@@ -403,7 +409,7 @@ void Init_proctable(){
|
|
403
409
|
|
404
410
|
/* Constants */
|
405
411
|
|
406
|
-
/* 0.9.
|
412
|
+
/* 0.9.3: The version of the sys-proctable library */
|
407
413
|
rb_define_const(cProcTable, "VERSION", rb_str_new2(SYS_PROCTABLE_VERSION));
|
408
414
|
|
409
415
|
/* Structs */
|
data/sys-proctable.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sys-proctable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.3
|
5
5
|
prerelease:
|
6
6
|
platform: universal-darwin
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-03-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: test-unit
|
@@ -76,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
76
76
|
version: '0'
|
77
77
|
requirements: []
|
78
78
|
rubyforge_project: sysutils
|
79
|
-
rubygems_version: 1.8.
|
79
|
+
rubygems_version: 1.8.23
|
80
80
|
signing_key:
|
81
81
|
specification_version: 3
|
82
82
|
summary: An interface for providing process table information
|