>>>>> "Baruch" == Baruch Siach <baruch@xxxxxxxxxx> writes: >> wlile (len) { >> n = write(fd, buf, len); >> if (n <= 0) break; >> len -= n; >> buf += n; >> } >> >> Which will then loop forever. Baruch> Well this code won't loop forever, since n == 0. Only if you do: Baruch> if (n < 0) break; Baruch> That is. Naturally, -ENOCOFFE. -- Bye, Peter Korsgaard -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html