double process for rebol CGI
[1/6] from: hallvard:ystad:helpinhand at: 17-Oct-2001 8:55
I'm testing a rebol script on a mac server, but it seems to launch two processes for
each request. Is this some setting I have missed, or is this normal behaviour (hope not)
? Here's a script that proved it repeatedly (it happens with all scripts, but I made
this one to have more than enough time to du a ps aux):
#!/Local/Applications/core024/rebol -cs
REBOL [ Title: "Wait" ]
print "Content-Type: text/plain^/"
print "About to wait"
wait 8
print "Finished waiting 8"
...and here are the processes that get launced when I do a request:
bash-2.02# ps auxw | grep rebol
portal 10965 0.9 0.4 3.98M 2.25M ? S 0:00 rebol -cs? /Local/Library/WebServer/CGI-Executables/wait.r
portal 10966 0.0 0.0 2.63M 140K ? S 0:00 rebol -cs? /Local/Library/WebServer/CGI-Executables/wait.r
root 10968 0.0 0.1 2.37M 600K p7 S 0:00 grep rebol
Can anyone explain?
~H
[2/6] from: office:thousand-hills at: 17-Oct-2001 9:01
What is the name of the REBOL .r file?
John
At 08:55 AM 10/17/2001 +0200, you wrote:
[3/6] from: hallvard:ystad:helpinhand at: 18-Oct-2001 10:47
The script file is %wait.r. Path to rebol is /Local/Applications/core024/.
For every request sent through a browser, two processes are launced on the
server. Can't figure it out. Damn it!
~H
office skrev (Wednesday 17.10.2001, kl. 16.01):
[4/6] from: holger::rebol::com at: 18-Oct-2001 6:30
On Thu, Oct 18, 2001 at 10:47:13AM +0200, Hallvard Ystad wrote:
> The script file is %wait.r. Path to rebol is /Local/Applications/core024/.
> For every request sent through a browser, two processes are launced on the
> server. Can't figure it out. Damn it!
Having those two processes is normal. One of them is a helper process for
REBOL's async DNS support.
--
Holger Kruse
[holger--rebol--com]
[5/6] from: hallvard:ystad:helpinhand at: 19-Oct-2001 11:24
[holger--rebol--com] skrev (Thursday 18.10.2001, kl. 15.30):
>Having those two processes is normal. One of them is a helper process for
>REBOL's async DNS support.
Fine, I won't worry about it then. But tell me: why are two processes
launched also for scripts when run locally? If I run the wait.r example,
which only prints out a few lines, there should be no need for DNS
stuff...?
~H
[6/6] from: holger:rebol at: 19-Oct-2001 7:06
On Fri, Oct 19, 2001 at 11:24:22AM +0200, Hallvard Ystad wrote:
> [holger--rebol--com] skrev (Thursday 18.10.2001, kl. 15.30):
> >Having those two processes is normal. One of them is a helper process for
<<quoted lines omitted: 3>>
> which only prints out a few lines, there should be no need for DNS
> stuff...?
The DNS process is launched very early during REBOL startup. There are
technical reasons for this. In a nutshell: on some Unix versions doing
it that way saves a lot of memory. There are other reasons though.
--
Holger Kruse
[holger--rebol--com]
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted