X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=sendlib.c;h=ae595c3bee1e674232795ee47b528fb8b69d383b;hp=37592120ba61eb342b9de456e412f6720a0cfc1d;hb=a16b0e24a0e811e35943c9f2d553a02d156d4961;hpb=230399f9632c37b66c1c117a17e8327eae6b3235 diff --git a/sendlib.c b/sendlib.c index 3759212..ae595c3 100644 --- a/sendlib.c +++ b/sendlib.c @@ -9,28 +9,14 @@ #define _SENDLIB_C 1 -#if HAVE_CONFIG_H -# include "config.h" -#endif +#include -#include -#include -#include -#include -#include -#include #include -#include -#include #include -#include - #include #include - #include - #include #include "mutt.h" @@ -1746,17 +1732,8 @@ send_msg(const char *path, const char **args, const char *msg, char **tempfile) setsid (); /* next we close all open files */ -#if defined(OPEN_MAX) - for (fd = 0; fd < OPEN_MAX; fd++) - close (fd); -#elif defined(_POSIX_OPEN_MAX) - for (fd = 0; fd < _POSIX_OPEN_MAX; fd++) + for (fd = 0; fd < getdtablesize(); fd++) close (fd); -#else - close (0); - close (1); - close (2); -#endif /* now the second fork() */ if ((pid = fork ()) == 0) {