Qmail
[Top] [All Lists]

RE: tcpserver+recordio logging issue [X200611297809]

To: mrd@alkemio.org, qmail@list.cr.yp.to, "d tbsky" <tbskyd@gmail.com>
Subject: RE: tcpserver+recordio logging issue [X200611297809]
From: "Maintenance Fees Inquiries" <MaintenanceFeesInquiries@USPTO.GOV>
Date: Wed, 29 Nov 2006 05:30:18 -0500
Delivered-to: sp-com-lists@consult.net
Delivered-to: gmail-qmail@securepoint.com
Delivered-to: sp.com.list@gmail.com
Delivered-to: mailing list qmail@list.cr.yp.to
Mailing-list: contact qmail-help@list.cr.yp.to; run by ezmlm
Thread-index: AccToV4Hg2OpgZ4cR3OfXPYw19vKKg==
Thread-topic: tcpserver+recordio logging issue [X200611297809]
Dear d tbsky,                                                                   
                                        Thank you for contacting the 
Maintenance Fee Branch.  You should receive a response within 2-3 business 
days.  The tracking number for your inquiry is X200611297809.                   
                                                                                
                                                       Maintenance Fee Branch 
(571) 272-6500



-----Original Message-----
From: d tbsky [mailto:tbskyd@gmail.com]
Sent: Wednesday, November 29, 2006 05:29 AM
To: qmail@list.cr.yp.to;mrd@alkemio.org
Cc: 
Subject: Re: tcpserver+recordio logging issue

hi:
   your code works great!!
   i try it to log about 6 hours. and every smtp-session is ending with
 tcpserver message.
   thanks a lot for your help!!
  and a stupid question, your code compile cleanly in mandriva 2007
with gcc 4.1, but in old version(mandriva 2006 or 2005),it give errors below:
   sorry for my little understanding in c.

wait-recordio.c: In function `main':
wait-recordio.c:6: error: `pid_t' undeclared (first use in this function)
wait-recordio.c:6: error: (Each undeclared identifier is reported only once
wait-recordio.c:6: error: for each function it appears in.)
wait-recordio.c:6: error: syntax error before "pid"
wait-recordio.c:8: error: `pid' undeclared (first use in this function)

Regards,
tbskyd

2006/11/28, Matthew R. Dempsky <mrd@alkemio.org>:
>  On Tue, Nov 28, 2006 at 09:12:00PM +0800, d tbsky wrote:
> > but somtimes that message is not the last. like this:
> > tcpserver: end 5165 status 256
> > tcpserver: status: 5/40
> > 5165 > 220 xxxxxxxxxxxxxxxx
> > 5165 > [EOF]
>
> Process 5165 wrote to stdout, exited, and was reaped by tcpserver
> before recordio received a time slice.
>
> > anyway i can make it  allways the last message?
>
> You need to ensure that recordio exits before tcpserver's child
> process exits.  Below is a quick blahwait program I threw together as
> proof of concept; it forks and runs the passed program, waits for it
> to return, then waits for one more process to exit (hopefully,
> recordio) before returning itself.
>
> You can then replace ``recordio foo...'' with ``recordio blahwait
> foo...''.  (Patching recordio or writing your own replacement would
> probably be more robust.)
>
> #include <unistd.h>
> #include <sys/wait.h>
>
> int main(int argc,char *argv[])
> {
>   pid_t pid;
>   int status;
>   switch (pid = fork()) {
>     case -1: return 111;
>     case 0: execvp(argv[1],argv + 1); return 111;
>   }
>   close(0);
>   close(1);
>   waitpid(pid,&status,0);
>   wait(0);
>   if (!WIFEXITED(status)) return 111;
>   return WEXITSTATUS(status);
> }
>



<Prev in Thread] Current Thread [Next in Thread>
  • RE: tcpserver+recordio logging issue [X200611297809], Maintenance Fees Inquiries <=