procmail
[Top] [All Lists]

metamail patch for annoying warning in procmail

2002-11-22 06:02:09
Courtesy of
<http://www.csoft.net/~dummy/robert/software/procmail/mime.shtml>
http://www.csoft.net/~dummy/robert/software/procmail/mime.shtml -- the
following is a patch that needs to be applied to metamail to make the
annoying freopen warning go away. 

*** src/metamail/metamail.c.orig        Thu Dec  5 17:41:32 1996

--- src/metamail/metamail.c     Thu Dec  5 17:41:32 1996

***************

*** 2330,2336 ****

              ConsumeRestOfPart(OutputFP);

      }

  #if !defined(AMIGA) && !defined(MSDOS)

!     if (UsingStandardInput && feof(InputFP) && !freopen("/dev/tty",
"r", stdin)) {

          fprintf(stderr, "Warning: Cannot freopen /dev/tty to stdin");

      } else InputFP = stdin;

  #endif

--- 2330,2336 ----

              ConsumeRestOfPart(OutputFP);

      }

  #if !defined(AMIGA) && !defined(MSDOS)

!     if (!MustNotBeTty && UsingStandardInput && feof(InputFP) &&
!freopen("/dev/tty", "r", stdin)) {

          fprintf(stderr, "Warning: Cannot freopen /dev/tty to stdin");

      } else InputFP = stdin;

  #endif

Don Yeske
Systems Analyst
Northrop Grumman PRB Systems (  <http://www.prb.net/> www.prb.net)
 <mailto:donald_yeske(_at_)prb(_dot_)net> donald_yeske(_at_)prb(_dot_)net
 
<Prev in Thread] Current Thread [Next in Thread>
  • metamail patch for annoying warning in procmail, Yeske, Donald <=