Module: Process

Defined in:
(unknown)

Class Method Summary collapse

Class Method Details

.getsid(pid) ⇒ Object


4
5
6
7
8
9
10
11
12
# File 'ext/getsid.c', line 4

static VALUE proc_getsid(VALUE obj, VALUE pid)
{
    rb_secure(2);
    pid_t sid = getsid(NUM2PIDT(pid));
    if (sid < 0) {
        rb_sys_fail(0);
    }
    return PIDT2NUM(sid);
}