cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: bug in runtests.pl ?

From: <Nico.Baggus_at_mail.ing.nl>
Date: Thu, 18 Oct 2001 17:18:35 +0200

Hi,

After thinking a little more about the test-bench, how about the following:

Let the server run without fork(), just a loop... (they are handling one request
at a time anyway...)

        socket()
          ...
        listen()

        for ( ; accept(Client, Server); close Client) {
                select Client;
                while (<Client>) {
                        .....
                }
                cleanup......
        }

for httpserver seems to be a little change.

Let the runtest.pl program start servers using:
        open(HTTP, "|$httpcmd"); # starts a proces, the pipe is
not needed....
or with:
        open(HTTP, "$httpcmd|"); # allows the test-server to send
status info, if we want it to.

Servers can be stopped with:
        close(HTTP); # should kill the server process
with a SIGPIPE
a perl exit should also kill these as the pipe is closed through
the process rundown in the kernel...

This is a scheme that probably will work on every platform as they are basic
functions
of perl and can be implemented in several ways, this is perfectly done on f.e.
VMS

just my .02

regards,
Nico Baggus

> -----Original Message-----
> From: curl_at_contactor.se
> Sent: 18-Oct-2001 09:24
> To: curl_at_contactor.se
> Subject: RE: bug in runtests.pl ?
>
>
> Hi,
>
> While you're at it, is it possible to remove the fork() from
> the testserver?
> If you do, the server would be usable from VMS too.
>
> At least modify it to use the fork()/exec() pair which will
> probably work
> because they
> are handled like system() but without waiting for the subprocess.
>
> regards,
> Nico Baggus
>
> > -----Original Message-----
> > From: curl_at_contactor.se
> > Sent: 17-Oct-2001 13:43
> > To: Curl Mailinglist <curl_at_contactor.se>
> > Subject: RE: bug in runtests.pl ?
> >
> >
> > On Fri, 12 Oct 2001, Roth, Kevin P. wrote:
> >
> > > > > I can agree with trying to kill an already
> > > > > running httpserver at startup
> > >
> > > > Will you be able to look into this?
> >
> > > If you get around to it sooner, please let us know ;-)
> >
> > I'm on to it now. Expect commits that brings this
> > functionality, if not
> > today at least very soon.
> >
> > --
> > Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
> >
> >
>
>
> -----------------------------------------------------------------
> ATTENTION:
> The information in this electronic mail message is private and
> confidential, and only intended for the addressee. Should you
> receive this message by mistake, you are hereby notified that
> any disclosure, reproduction, distribution or use of this
> message is strictly prohibited. Please inform the sender by
> reply transmission and delete the message without copying or
> opening it.
>
> Messages and attachments are scanned for all viruses known.
> If this message contains password-protected attachments, the
> files have NOT been scanned for viruses by the ING mail domain.
> Always scan attachments before opening them.
> -----------------------------------------------------------------
>
Received on 2001-10-18