module Process

def job?

Returns whether or not the current process is part of a Job (process group).
def job?
  pbool = FFI::MemoryPointer.new(:int)
  IsProcessInJob(GetCurrentProcess(), nil, pbool)
  pbool.read_int == 1 ? true : false
end