projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix compilation warnings in pgp.c
[apps/madmutt.git]
/
sendlib.c
diff --git
a/sendlib.c
b/sendlib.c
index
ef2b9da
..
ae595c3
100644
(file)
--- a/
sendlib.c
+++ b/
sendlib.c
@@
-1732,17
+1732,8
@@
send_msg(const char *path, const char **args, const char *msg, char **tempfile)
setsid ();
/* next we close all open files */
setsid ();
/* next we close all open files */
-#if defined(OPEN_MAX)
- for (fd = 0; fd < OPEN_MAX; fd++)
+ for (fd = 0; fd < getdtablesize(); fd++)
close (fd);
close (fd);
-#elif defined(_POSIX_OPEN_MAX)
- for (fd = 0; fd < _POSIX_OPEN_MAX; fd++)
- close (fd);
-#else
- close (0);
- close (1);
- close (2);
-#endif
/* now the second fork() */
if ((pid = fork ()) == 0) {
/* now the second fork() */
if ((pid = fork ()) == 0) {