Branch: Tag:

1997-11-01

1997-11-01 23:05:29 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Now closes all other fds than stdin, stdout and stderr at start.

Rev: src/main.c:1.25

4:   ||| 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"
63:       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");