basic stuff, some adapted from remindme
sorting poll and opening of stdin
further improvements and for some reason i adjusted the variable names
issues with huge loops at the moment
fixed a memaccess issue with sig_id file
actually saving some input to logfile
almost processing strings, but not feeding to command line properly