News for hackers. Stuff that matters.
Re:Bugs in Hello World by jll29 on Wednesday March 09, 2022 @04:29AM (#30612557)
#include <stdio.h>

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

Re:Bugs in Hello World by nemetroid on Wednesday March 09, 2022 @04:48AM (#30612696)
First off, main should return 0 on success, not 1. Second, puts() will happily return 0 when writing to /dev/full.
Re:Bugs in Hello World by kikoreis on Wednesday March 09, 2022 @07:38AM (#30613775)
Only if the write is buffered, right?