[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenonbeta/icecream/icecream/daemon
From: Stephan Kulow <coolo () kde ! org>
Date: 2004-08-30 15:16:14
Message-ID: 20040830151614.406BB2012 () office ! kde ! org
[Download RAW message or body]
CVS commit by coolo:
don't support this strange -w feature any longer (doesn't work with NFS, etc, etc)
M +1 -1 Makefile.am 1.14
M +0 -38 main.cpp 1.100
R findmyself.cpp 1.2
R findmyself.h 1.2
--- kdenonbeta/icecream/icecream/daemon/Makefile.am #1.13:1.14
@@ -3,4 +3,4 @@
bin_PROGRAMS = iceccd
-iceccd_SOURCES = ncpus.c main.cpp serve.cpp workit.cpp environment.cpp load.cpp findmyself.cpp
+iceccd_SOURCES = ncpus.c main.cpp serve.cpp workit.cpp environment.cpp load.cpp
iceccd_LDADD = ../services/libcommon.la
--- kdenonbeta/icecream/icecream/daemon/main.cpp #1.99:1.100
@@ -78,5 +78,4 @@
#include "load.h"
#include "environment.h"
-#include "findmyself.h"
const int PORT = 10245;
@@ -272,5 +271,4 @@ int main( int argc, char ** argv )
string netname;
- bool watch_binary = false;
string envbasedir = "/tmp/icecc-envs";
int debug_level = Error;
@@ -288,5 +286,4 @@ int main( int argc, char ** argv )
{ "netname", 1, NULL, 'n' },
{ "max-processes", 1, NULL, 'm' },
- { "watch", 0, NULL, 'w' },
{ "help", 0, NULL, 'h' },
{ "daemonize", 0, NULL, 'd'},
@@ -354,7 +351,4 @@ int main( int argc, char ** argv )
usage("Error: -m requires argument");
break;
- case 'w':
- watch_binary = true;
- break;
case 's':
if ( optarg && *optarg )
@@ -409,18 +403,4 @@ int main( int argc, char ** argv )
nodename = uname_buf.nodename;
- std::string binary_path = argv[0];
- time_t binary_on_startup = 0;
- if ( watch_binary ) {
- // important to do before chdir ;/
- if ( !findmyself( binary_path ) ) {
- log_error() << "can't find binary " << argv[0] << endl;
- return 1;
- }
- trace() << "watching " << binary_path << endl;
- struct stat st;
- stat( binary_path.c_str(), &st );
- binary_on_startup = st.st_mtime;
- }
-
chdir( "/" );
@@ -636,22 +616,4 @@ int main( int argc, char ** argv )
}
- if ( time( 0 ) - last_stat >= 10 && watch_binary ) {
- struct stat st;
- ::stat( binary_path.c_str(), &st );
- if ( binary_on_startup != st.st_mtime ) {
- log_info() << "binary changed. Going to restart it" << endl;
- char **new_argv = new char *[netname.empty() ? 3 : 5];
- int argi = 0;
- new_argv[argi++] = strdup( binary_path.c_str() );
- new_argv[argi++] = strdup( "-w" );
- if ( !netname.empty() ) {
- new_argv[argi++] = strdup( "-n" );
- new_argv[argi++] = strdup( netname.c_str() );
- }
- new_argv[argi++] = 0;
- execv( binary_path.c_str(), new_argv );
- }
- }
-
if ( !maybe_stats() ) {
log_error() << "lost connection to scheduler. Trying again.\n";
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic