node/lib/metasm/metasm/os/linux.rb
# returns a list of threads sharing this process address space
# read from /proc/pid/task/
returns a list of threads sharing this process address space
read from /proc/pid/task
returns a list of threads sharing this process address space read from / proc / pid / task
def threads
			Dir.entries("/proc/#{pid}/task/").grep(/^\d+$/).map { |tid| tid.to_i }
		rescue
			[pid]
		end
def threads Dir . entries ( "/proc/#{pid}/task/" ) . grep ( / ^ \d +$ / ) . map { | tid | tid . to_i } rescue [ pid ] end
returns a list of threads sharing this process address space
read from /proc/pid/task
returns a list of threads sharing this process address space read from / proc / pid / task
# TODO handle pthread stuff (eg 2.4 kernels)