2
# $Id: launch.tcl 391 2007-01-25 03:53:59Z mikes@u.washington.edu $
3
# ========================================================================
4
# Copyright 2006 University of Washington
6
# Licensed under the Apache License, Version 2.0 (the "License");
7
# you may not use this file except in compliance with the License.
8
# You may obtain a copy of the License at
10
# http://www.apache.org/licenses/LICENSE-2.0
12
# ========================================================================
14
# Generate a session key, create the connection points (fifos),
15
# spawn the mail engine and then hand the session key to the
18
# Source config information
24
if {[info exists env(REMOTE_USER)]} {
25
set servlet $_wp(pc_servlet)
26
set env(LOGNAME) $env(REMOTE_USER)
28
set servlet $_wp(servlet)
31
set cmd "exec -- echo $_wp(sockname) | [file join $_wp(bin) $servlet]"
33
if {[catch {eval $cmd} errmsg]} {
34
puts stderr "Unable to Launch servlet: $errmsg"
36
} elseif {[info exists env(REMOTE_ADDR)] && [string length $env(REMOTE_ADDR)]} {
37
catch {WPCmd PEInfo set wp_client $env(REMOTE_ADDR)}
38
} elseif {[info exists env(REMOTE_HOST)] && [string length $env(REMOTE_HOST)]} {
39
catch {WPCmd PEInfo set wp_client $env(REMOTE_HOST)}
42
if {$_wp(debug) > 0} {
43
WPCmd PEDebug level $_wp(debug)