Re: EDQUOT lurks in most apps

2024-12-11 Thread Florian Weimer
* John Reiser: > The C runtime library (package glibc) implementation of exit() > could help by calling close_range() of low-numbered output > [not input!] file descriptors, especially stdout, and checking > for errors. ENOSPC also has this problem. We would have to fsync (after the implicit ffl

Re: EDQUOT lurks in most apps

2024-12-11 Thread Miroslav Suchý
Dne 11. 12. 24 v 5:27 odp. John Reiser napsal(a): If a shell re-directs stdout into a file, then the data might never be captured, Similar problem is when user redirect the output to /dev/null - the output is never printed. Or when user push power button between printf() and return. -- M

Re: EDQUOT lurks in most apps

2024-12-11 Thread Tulio Magno Quites Machado Filho
Stephen Smoogen writes: > I have seen this listed as NOT A BUG even with realtime programmers because > the application can be run in all kinds of ways which could induce failures > that are 'environment' versus 'application'. I expect it depends on the > exact environment but what is the correct

Re: EDQUOT lurks in most apps

2024-12-11 Thread Stephen Smoogen
On Wed, 11 Dec 2024 at 11:28, John Reiser wrote: > There's a bug in this program. Can you spot it? > = > #include > > int > main(int argc, char *argv[]) > { > printf("Hello, world!\n"); > return 0; > } > = > > The bug is that EDQUOT (Disk Quota exceeded: > /usr/include/asm-gen

EDQUOT lurks in most apps

2024-12-11 Thread John Reiser
There's a bug in this program. Can you spot it? = #include int main(int argc, char *argv[]) { printf("Hello, world!\n"); return 0; } = The bug is that EDQUOT (Disk Quota exceeded: /usr/include/asm-generic/errno.h) is not detected. If a shell re-directs stdout into a file, t