Re: (no subject)
"Chen Yang" <[email protected]> Thu, 16 Jan 2003 21:59:06 +0800
| Newsgroups | gmane.comp.file-systems.intermezzo.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi,Alexander:
Here is the proposed patch for the problem.It adds a file exist test in the execution flow. Try it and tell me the result.
Thanks.
--- intersync.c.orig 2003-01-13 01:02:06.000000000 +0800
+++ intersync.c 2003-01-13 01:16:14.000000000 +0800
@@ -110,6 +110,19 @@
}
}
+static int config_file_not_exist(char *configfile)
+{
+ int fd ;
+
+ fd = open(configfile,O_RDONLY);
+
+ if (fd>0) {
+ close(fd);
+ return 0;
+ }
+ else
+ return 1;
+}
static void start_server(char *docroot, char * ip, int port)
{
@@ -143,7 +156,8 @@
pidfile = g_strdup_printf("%s/httpd.pid", docroot);
configfile = g_strdup_printf("%s/intersync-httpd.conf", docroot);
- config_apache_conf(configfile, ip, port, docroot, IS_CGIDIR);
+ if(config_file_not_exist(configfile))
+ config_apache_conf(configfile, ip, port, docroot, IS_CGIDIR);
sigact.sa_handler = signal_server;
sigfillset(&sigact.sa_mask);
>
> Chen Yang,
>
> This is a rather simple fix to now always overwrite the existing conf
> file. I have filed this as a bug to be fixed on
> bugzilla.inter-mezzo.org. Chen Yang, can you get an account on that
> bugzilla there asap?
>
> Thanks!
>
> - Peter -
>
>
>
> On Tue, Dec 24, 2002 at 08:55:13PM +0200, Alexander Piavka wrote:
> >
> > the file /var/intermezzo-0/intersync-httpd.conf is overwriten each time i
> > restart the intersync daemon. I would to add the following to intersync-httpd.conf:
> > MinSpareServers 1
> > MaxSpareServers 2
> > StartServers 2
> >
> > since there are just too much many instances (7) of apache runing.
> > I tried to change the /var/intermezzo-0/intersync-httpd.conf file directly
> > but it is overwriten each time with default configuration.
> > Is it possible to do it, or this is not controlled from
> > /var/intermezzo-0/intersync-httpd.conf, since probably each forked( or
> > threaded?) instance of intersync is connecting to apache(i see that
> > there are same number of apaches and intersyncs). If so then is it
> > possible to reduce the number of intersync processes/threads?
> >
> > ps. does intersync deamon forks so many processes or these are just
> > threads?
> >
> > Thanks a lot.
> >
> >
> >
> > -------------------------------------------------------
> > This sf.net email is sponsored by:ThinkGeek
> > Welcome to geek heaven.
> > http://thinkgeek.com/sf
> > _______________________________________________
> > intermezzo-discuss mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/intermezzo-discuss
> - Peter -
>
>
> -------------------------------------------------------
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> http://www.vasoftware.com
> _______________________________________________
> intermezzo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/intermezzo-devel
>
-------------------------------------------------------
This SF.NET email is sponsored by: Thawte.com
Understand how to protect your customers personal information by implementing
SSL on your Apache Web Server. Click here to get our FREE Thawte Apache
Guide: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0029en