Making system call non-blocking