Hi folks,
following the other Igor's lead of providing a start script for Solaris,
I decided to provide one for Ubuntu/Fedora's upstart
# trafficserver - Apache Traffic Server
#
# is a fast, scalable and extensible HTTP/1.1 compliant
# caching proxy server.
description "Apache Traffic Server"
start on virtual-filesystems
stop on runlevel [06]
expect fork
respawn
exec @exp_bindir@/traffic_cop &
Now as it turns out this is a little too naive:
Solaris' SMF uses contract(4)s to stalk processes and find
out which belong together.
In upstart we simply use the session id:
PID PGID SID TTY STAT TIME COMMAND
26499 26499 26499 ? Ss 0:00 /opt/bw/bin/traffic_cop
26504 26504 26504 ? Ssl 0:00 /opt/bw/bin/traffic_manager
26517 26504 26504 ? Sl 0:00 /opt/bw/bin/traffic_server -M -A,7:X
That's right. traffic_manager starts a new setid().
I'm contemplating to remove this, so if nobody objects with
reasonable reason, I'll commit this:
i.galic@panic ~/Projects/asf/trafficserver (svn)-[trunk:1096618] % svn diff
Index: mgmt/Main.cc
===================================================================
--- mgmt/Main.cc (revision 1096618)
+++ mgmt/Main.cc (working copy)
@@ -485,8 +485,6 @@
time_t ticker;
ink_thread webThrId;
- while ((setsid() == (pid_t) - 1) && (errno == EINTR)) {
- }
// Set up the application version info
appVersionInfo.setup(PACKAGE_NAME,"traffic_manager", PACKAGE_VERSION,
i.galic@panic ~/Projects/asf/trafficserver (svn)-[trunk:1096618] %
So long,
i
--
Igor Galić
Tel: +43 (0) 664 886 22 883
Mail: [email protected]
URL: http://brainsware.org/