pike.git / src / main.c

version» Context lines:

pike.git/src/main.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   #include "global.h" - RCSID("$Id: main.c,v 1.24 1997/10/27 09:59:22 hubbe Exp $"); + RCSID("$Id: main.c,v 1.25 1997/11/01 23:05:29 grubba Exp $");   #include "backend.h"   #include "module.h"   #include "object.h"   #include "lex.h"   #include "pike_types.h"   #include "builtin_functions.h"   #include "array.h"   #include "stralloc.h"   #include "interpret.h"   #include "error.h"
pike.git/src/main.c:56:      void main(int argc, char **argv, char **env)   {    JMP_BUF back;    int e, num;    char *p;    struct array *a;       ARGV=argv;    +  /* Close extra fds (if any) */ +  for (e=3; e < MAX_OPEN_FILEDESCRIPTORS; e++) { +  do { +  num = close(e); +  } while ((num < 0) && (errno == EINTR)); +  } +    #ifdef HAVE_SETLOCALE   #ifdef LC_NUMERIC    setlocale(LC_NUMERIC, "C");   #endif   #ifdef LC_CTYPE    setlocale(LC_CTYPE, "");   #endif   #ifdef LC_TIME    setlocale(LC_TIME, "C");   #endif