Multiple minor changes:

1. Return -1 from main function as error code.
2. Close useless file descriptors in child process.
3. Improving some comments and error messages.
4. Errors from poll function.