To avoid warn_unused_result warnings you'd better use an 'int rc = ' construct
to store the return value of write(), chroot(), chdir() and nice().
gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4)
---------
gcc -O2 -Wall -W -pipe -D_GNU_SOURCE -c -o mingetty.o mingetty.c
mingetty.c: In function âopen_ttyâ:
mingetty.c:195: warning: ignoring return value of âwriteâ, declared with attribute...