crw-------. 1 root root 5, 1 Oct 30 18:53 /dev/console
I don't feel comfortable redirecting it in the build scripts.
On the other hand: I'm most likely the only one constantly ignoring warnings and running
the Arch build scripts as root, so I don't care about permission.. ;-)
But i have a question: that crash could only happen if /dev/console is not writable, i.e., if the call fdopen(fileno(n_stdin), "w") would fail.
How could that be given that n_stdin/n_stdout/n_stderr == stdin/stdout/stderr and the test framework does 'exec </dev/console'?
I hesitate to add a PKGBUILD variable 'tty_is_console: yes' or so for packages needing
it..
I also don't like to patch s-nail..
setvbuf(n_stdin, NULL, _IOLBF, 0);
setvbuf(n_stdout, NULL, _IOLBF, 0);
setvbuf(n_tty_fp, NULL, _IOLBF, 0);
setvbuf(n_stdout, NULL, _IOLBF, 0);
setvbuf(n_stdin, NULL, _IOLBF, 0);
So, if this is a there to disable stdin/stdout buffering in non-TTY mode, I have
actually three questions:
- why is building with the build scripts triggering the segfault?
- why is s-nail not using _IONBF to enable non-buffering behaviour?
- was there a glibc change? setvbuf with no buffer and 0 as size parameter:
what does it mean exactly? implementations and standards are a little bit
vague here..
The secret is to set 'ulimit -c unlimited' in for instance ' /var/lib/archbuild/staging-i686/root/etc/profile'
and of course configure coredump.conf correctly.
All the cores segfault in:
(gdb) bt
#0 0xf71f94aa in setvbuf () from /usr/lib/libc.so.6
#1 0x56618af9 in main ()