OSSP CVS Repository

ossp - Check-in [3237]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 3237
Date: 2003-Feb-12 17:08:26 (local)
2003-Feb-12 16:08:26 (UTC)
User:rse
Branch:
Comment: use fully unbuffered I/O to reduce libc memory leaks at exit (our stdin is still buffered because of own buffering)
Tickets:
Inspections:
Files:
ossp-pkg/lmtp2nntp/lmtp2nntp_main.c      1.74 -> 1.75     5 inserted, 0 deleted

ossp-pkg/lmtp2nntp/lmtp2nntp_main.c 1.74 -> 1.75

--- lmtp2nntp_main.c     2003/02/12 15:55:49     1.74
+++ lmtp2nntp_main.c     2003/02/12 16:08:26     1.75
@@ -356,6 +356,11 @@
     seteuid(getuid());
     setegid(getgid());
 
+    /* use unbuffered stdio */
+    setvbuf(stdin,  NULL, _IONBF, 0);
+    setvbuf(stdout, NULL, _IONBF, 0);
+    setvbuf(stderr, NULL, _IONBF, 0);
+
     /* library version check (run-time) */
     if (l2_version.v_hex < L2_VERSION_HEX_REQ) {
         fprintf(stderr, "require OSSP L2 >= %s, found %s\n", L2_VERSION_STR_REQ, L2_VERSION_STR);

CVSTrac 2.0.1