Ticket #93: cons_nonblock.patch

File cons_nonblock.patch, 669 bytes (added by slavazanko, 16 years ago)
  • src/cons.saver.c

    #
    # cons.saver: open the console in non-blocking mode
    #
    # Source:	Gentoo Portage
    # Reference:	4.6.1
    # Submit-By:	Enrico Weigelt, metux IT service <weigelt metux de>
    # Submit-Date:	2008-12-26
    # State:	new
    #
    diff -ruN mc-4.6.1.orig/src/cons.saver.c mc-4.6.1/src/cons.saver.c
    old new  
    134134 
    135135  if (seteuid (uid) < 0) 
    136136    die (); 
    137   console_fd = open (tty_name, O_RDONLY); 
     137  console_fd = open (tty_name, O_RDONLY | O_NONBLOCK); 
    138138  if (console_fd < 0) 
    139139    die (); 
    140140  if (fstat (console_fd, &st) < 0 || ! S_ISCHR (st.st_mode))