swap arguments for kill() call, since pid is the first argument