fixed most of syscalls
added comments
added script
added test.cpp to check ctrl+c