Doing: Client pipe received data to child process; when dup2 pipe[write] and socket before operation that are only for sockets will result 'bad file descriptor' error, such as send() function; using strace to spot this error