Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Pick your poison

Name: Anonymous 2011-06-24 5:46


 switch(fd)
 {
  case 0:
   f = freopen(_PATH_DEVNULL, r, stdin);
  break;
  case 1:
   f = freopen(_PATH_DEVNULL, w, stdout);
  break;
  case 2:
   f = freopen(_PATH_DEVNULL, w, stderr);
  break;
  default:
   f = NULL;
  break; 
 }



 f = (fd == 0) ? freopen(_PATH_DEVNULL, r, stdin)
               : (fd == 1) ? freopen(_PATH_DEVNULL, w, stdout)
                           : (fd == 2) ? freopen(_PATH_DEVNULL, w, stderr)
                                       : NULL;

Name: Anonymous 2011-06-24 19:04

>>13
#include <pathnames.h>

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List