cvs commit: qpsmtpd/plugins/queue qmail-queue

[email protected] (Robert Spier)
Newsgroups perl.cvs.qpsmtpd
Message-ID <[email protected]>
cvsuser     04/11/27 09:54:46

  Modified:    plugins/queue qmail-queue
  Log:
  Remove extraneous filehandling twiddling from qmail-queue that could cause weirdness if the exec failed.
  
  Revision  Changes    Path
  1.8       +3 -8      qpsmtpd/plugins/queue/qmail-queue
  
  Index: qmail-queue
  ===================================================================
  RCS file: /cvs/public/qpsmtpd/plugins/queue/qmail-queue,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- qmail-queue	27 Nov 2004 07:08:46 -0000	1.7
  +++ qmail-queue	27 Nov 2004 17:54:46 -0000	1.8
  @@ -99,16 +99,11 @@
       POSIX::dup2(fileno(MESSAGE_READER), 0) or die "Unable to dup MESSAGE_READER: $!";
       POSIX::dup2(fileno(ENVELOPE_READER), 1) or die "Unable to dup ENVELOPE_READER: $!";
   
  -    $self->log(LOGNOTICE, "Queuing to $queue_exec");
  +    my $ppid = getppid();
  +    $self->log(LOGNOTICE, "(for $ppid ) Queuing to $queue_exec");
   
       my $rc = exec $queue_exec;
   
  -    # restore the original STDIN and STDOUT
  -    open(STDIN, "<&SAVE_STDIN");
  -    open(STDOUT, ">&SAVE_STDOUT");
  -
  -    # NB: The "if not $rc" is redundant since exec() won't return if it
  -    # succeeds.
  -    exit 6 if not $rc;
  +    exit 6; # we'll only get here if the exec fails
     }
   }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.