HP3000-L Archives

May 2001, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Lars Appel <[log in to unmask]>
Reply To:
Lars Appel <[log in to unmask]>
Date:
Sat, 12 May 2001 19:04:20 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (26 lines)
> ... I have a program which
>does just printf(), fork(), printf() and it executes (from
>the command line) just fine so it isn't fork() itself
>unless fork() for some reason takes a long time if it is a
>big program like APACHE doing the fork() instead of a
>little test program.

Well, I would probably expect a very small program to fork()
much more efficiently than a large program like httpd, because
the large program would probably have much more resourced that
have to be allocated/cloned during the fork() event.

In the case of a CGI shell script, there would then also be
the child httpd process calling exec() to invoke the /bin/sh
program code in place, which might also be far from small.

You might want to try a little compiled test program instead
of the CGI shell script to see if that is more efficient in
the CGI context. The program could do just a few write() calls
similar to the echo statements of the shell script.

Lars.

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2