+end
+
+function get_children()
+
+ local pid = posix.getpid()
+ local pidlist = list_dir('/proc')
+ local pids = {}
+
+ for k,v in pairs(pidlist) do
+
+ pcall( function ()
+ local stats = get_file_content('/proc/'..v..'/stat')
+ local ppid = tonumber(split(stats,' ')[4])
+ if pid == ppid then
+ pids[#pids+1] = tonumber(v)
+ end
+ end)
+
+ end
+
+ return pids
+
+end