> in main.c look for fork().
looks like it is that:
for (;;) {
mainStartScript(argv[0]);
if ((pid = fork()) == 0) {
/* child */
openlog(appname, LOG_PID | LOG_NDELAY | LOG_CONS, LOG_LOCAL4);
prog = xstrdup(argv[0]);
argv[0] = xstrdup("(squid)");
execvp(prog, argv);
syslog(LOG_ALERT, "execvp failed: %s", xstrerror());
}
/* parent */
openlog(appname, LOG_PID | LOG_NDELAY | LOG_CONS, LOG_LOCAL4);
syslog(LOG_NOTICE, "Squid Parent: child process %d started", pid);
time(&start);
it forks and child process reexecutes squid but with "(squid)" argv[0]
set. so where this child process (the same executable) know it should
behave as master or worker process??
i can't find that
Received on Sun Apr 29 2001 - 04:31:40 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:13:51 MST