3 ms·
Indeed: https://github.com/sickill/stderred/pull/1 https://github.com/sickill/stderred/pull/1
by nviennot 15y ago
Indeed: https://github.com/sickill/stderred/pull/1 https://github.com/sickill/stderred/pull/1
- agwa 15y agoI agree that writev is a better approach. But your patch doesn't look thread-safe because it uses that static iovec struct.
- nviennot 15y agoYou are right, and there are other issues: - I don't return the proper return value (should not return the number of bytes from the color strings) - I don't handle the case where writev() returns a number of bytes between 0 and count (e.g. You are writing 10Mb of data, a signal arrives, and you only wrote 5Mb -- the color thing will get all confused)