Hacker News new | ask | show | jobs
by jll29 1561 days ago
#include <stdio.h>

int main(void) { return !(puts("Hello, new world!") == EOF); /* return 0 unless a rare I/O error occurs */ }

1 comments

First off, main should return 0 on success, not 1. Second, puts() will happily return 0 when writing to /dev/full.
Only if the write is buffered, right?