structstd.os.emscripten.W[src]

Values

ConstantNOHANG[src]

Source Code

Source code
pub const NOHANG = 1

ConstantUNTRACED[src]

Source Code

Source code
pub const UNTRACED = 2

ConstantSTOPPED[src]

Source Code

Source code
pub const STOPPED = 2

ConstantEXITED[src]

Source Code

Source code
pub const EXITED = 4

ConstantCONTINUED[src]

Source Code

Source code
pub const CONTINUED = 8

ConstantNOWAIT[src]

Source Code

Source code
pub const NOWAIT = 0x1000000

Functions

FunctionEXITSTATUS[src]

pub fn EXITSTATUS(s: u32) u8

Parameters

s: u32

Source Code

Source code
pub fn EXITSTATUS(s: u32) u8 {
    return @as(u8, @intCast((s & 0xff00) >> 8));
}

FunctionTERMSIG[src]

pub fn TERMSIG(s: u32) u32

Parameters

s: u32

Source Code

Source code
pub fn TERMSIG(s: u32) u32 {
    return s & 0x7f;
}

FunctionSTOPSIG[src]

pub fn STOPSIG(s: u32) u32

Parameters

s: u32

Source Code

Source code
pub fn STOPSIG(s: u32) u32 {
    return EXITSTATUS(s);
}

FunctionIFEXITED[src]

pub fn IFEXITED(s: u32) bool

Parameters

s: u32

Source Code

Source code
pub fn IFEXITED(s: u32) bool {
    return TERMSIG(s) == 0;
}

FunctionIFSTOPPED[src]

pub fn IFSTOPPED(s: u32) bool

Parameters

s: u32

Source Code

Source code
pub fn IFSTOPPED(s: u32) bool {
    return @as(u16, @truncate(((s & 0xffff) *% 0x10001) >> 8)) > 0x7f00;
}

FunctionIFSIGNALED[src]

pub fn IFSIGNALED(s: u32) bool

Parameters

s: u32

Source Code

Source code
pub fn IFSIGNALED(s: u32) bool {
    return (s & 0xffff) -% 1 < 0xff;
}

Source Code

Source code
pub const W = struct {
    pub const NOHANG = 1;
    pub const UNTRACED = 2;
    pub const STOPPED = 2;
    pub const EXITED = 4;
    pub const CONTINUED = 8;
    pub const NOWAIT = 0x1000000;

    pub fn EXITSTATUS(s: u32) u8 {
        return @as(u8, @intCast((s & 0xff00) >> 8));
    }
    pub fn TERMSIG(s: u32) u32 {
        return s & 0x7f;
    }
    pub fn STOPSIG(s: u32) u32 {
        return EXITSTATUS(s);
    }
    pub fn IFEXITED(s: u32) bool {
        return TERMSIG(s) == 0;
    }
    pub fn IFSTOPPED(s: u32) bool {
        return @as(u16, @truncate(((s & 0xffff) *% 0x10001) >> 8)) > 0x7f00;
    }
    pub fn IFSIGNALED(s: u32) bool {
        return (s & 0xffff) -% 1 < 0xff;
    }
}