Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 127411 | Differences between
and this patch

Collapse All | Expand All

(-)mc-4.6.0.orig/src/cons.saver.c (-2 / +2 lines)
Lines 90-96 static int check_file (char *filename, i Link Here
90
    /* Avoiding race conditions: use of fstat makes sure that
90
    /* Avoiding race conditions: use of fstat makes sure that
91
       both 'open' and 'stat' operate on the same file */
91
       both 'open' and 'stat' operate on the same file */
92
92
93
    fd = open (filename, O_RDWR);
93
    fd = open (filename, O_RDWR | O_NONBLOCK);
94
    if (fd == -1)
94
    if (fd == -1)
95
	return -1;
95
	return -1;
96
    
96
    
Lines 247-253 int main (int argc, char **argv) Link Here
247
     * Make sure stderr points to a valid place
247
     * Make sure stderr points to a valid place
248
     */
248
     */
249
    close (2);
249
    close (2);
250
    stderr_fd = open ("/dev/tty", O_RDWR);
250
    stderr_fd = open ("/dev/tty", O_RDWR | O_NONBLOCK);
251
251
252
    /* This may well happen if program is running non-root */
252
    /* This may well happen if program is running non-root */
253
    if (stderr_fd == -1)
253
    if (stderr_fd == -1)

Return to bug 127411