added new timout method with vfork
removed vfork timout, because the dangerous of messing stdlibs up when canceling from shared memory
improoved speed by using alarm timer
added missing includes
added missing includes
style improoved