bugfix: cmd buffer is on stack, couldn't realloc, buffer could memset only when cmdpos = 0. feature: inotify should be a lib without process