getsid 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ext/extconf.rb +3 -0
- data/ext/getsid.c +17 -0
- metadata +48 -0
data/ext/extconf.rb
ADDED
data/ext/getsid.c
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
#include <unistd.h>
|
2
|
+
#include <ruby.h>
|
3
|
+
|
4
|
+
static VALUE proc_getsid(VALUE obj, VALUE pid)
|
5
|
+
{
|
6
|
+
rb_secure(2);
|
7
|
+
pid_t sid = getsid(NUM2PIDT(pid));
|
8
|
+
if (sid < 0) {
|
9
|
+
rb_sys_fail(0);
|
10
|
+
}
|
11
|
+
return PIDT2NUM(sid);
|
12
|
+
}
|
13
|
+
|
14
|
+
void Init_getsid(void)
|
15
|
+
{
|
16
|
+
rb_define_module_function(rb_mProcess, "getsid", proc_getsid, 1);
|
17
|
+
}
|
metadata
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: getsid
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Roman Shterenzon
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-10-14 00:00:00.000000000 Z
|
13
|
+
dependencies: []
|
14
|
+
description: Process.getsid()
|
15
|
+
email: romanbsd@yahoo.com
|
16
|
+
executables: []
|
17
|
+
extensions:
|
18
|
+
- ext/extconf.rb
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- ext/getsid.c
|
22
|
+
- ext/extconf.rb
|
23
|
+
homepage: http://github.com/romanbsd/getsid
|
24
|
+
licenses:
|
25
|
+
- MIT
|
26
|
+
post_install_message:
|
27
|
+
rdoc_options: []
|
28
|
+
require_paths:
|
29
|
+
- lib
|
30
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
31
|
+
none: false
|
32
|
+
requirements:
|
33
|
+
- - ! '>='
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: '0'
|
36
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
37
|
+
none: false
|
38
|
+
requirements:
|
39
|
+
- - ! '>='
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
42
|
+
requirements: []
|
43
|
+
rubyforge_project:
|
44
|
+
rubygems_version: 1.8.24
|
45
|
+
signing_key:
|
46
|
+
specification_version: 3
|
47
|
+
summary: Process.getsid()
|
48
|
+
test_files: []
|