1 karl 1.5 //%2006////////////////////////////////////////////////////////////////////////
|
2 h.sterling 1.1 //
|
3 martin 1.3 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
4 // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
5 // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
6 // IBM Corp.; EMC Corporation, The Open Group.
7 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
8 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
9 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
10 // EMC Corporation; VERITAS Software Corporation; The Open Group.
|
11 karl 1.5 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
12 // EMC Corporation; Symantec Corporation; The Open Group.
|
13 h.sterling 1.1 //
14 // Permission is hereby granted, free of charge, to any person obtaining a copy
15 // of this software and associated documentation files (the "Software"), to
16 // deal in the Software without restriction, including without limitation the
17 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
18 // sell copies of the Software, and to permit persons to whom the Software is
19 // furnished to do so, subject to the following conditions:
|
20 karl 1.5 //
|
21 h.sterling 1.1 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
22 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
23 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
24 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
25 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
26 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
27 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 //
30 //==============================================================================
31 //
32 // Author: Sean Keenan (sean.keenan@hp.com)
33 //
34 //%/////////////////////////////////////////////////////////////////////////////
35
36 #include <sys/types.h>
37 #include <sys/stat.h>
38 #include <fcntl.h>
39 #include <unistd.h>
40 #include <Pegasus/Common/Signal.h>
|
41 kumpf 1.6
|
42 h.sterling 1.1 #define MAX_WAIT_TIME 25
43
44 PEGASUS_USING_PEGASUS;
45 PEGASUS_USING_STD;
46
47 Boolean handleSigUsr1 = false;
48
49 String newPortNumber = "";
50 String pegasusTrace = "";
51
52
53 void sigUsr1Handler(int s_n, PEGASUS_SIGINFO_T * s_info, void * sig)
54 {
55 handleSigUsr1 = true;
56 }
57
58 //constructor
59 ServerProcess::ServerProcess() {}
60
61 //destructor
62 ServerProcess::~ServerProcess() {}
63 h.sterling 1.1
64 // no-ops
65 int ServerProcess::cimserver_fork(void) { return 0; }
66 void ServerProcess::cimserver_set_process(void* p) {}
67 void ServerProcess::cimserver_exitRC(int rc) {}
68 int ServerProcess::cimserver_initialize(void) { return 1; }
69 int ServerProcess::cimserver_wait(void) { return 1; }
70 String ServerProcess::getHome(void) { return String::EMPTY; }
71
72 // notify parent process to terminate so user knows that cimserver
73 // is ready to serve CIM requests.
74 void ServerProcess::notify_parent(int id)
75 {
76 pid_t ppid = getppid();
77 if (id)
78 kill(ppid, SIGTERM);
79 else
|
80 martin 1.3 kill(ppid, PEGASUS_SIGUSR1);
|
81 h.sterling 1.1 }
82
83 // Platform specific run
|
84 kumpf 1.4 int ServerProcess::platform_run(
85 int argc,
86 char** argv,
87 Boolean shutdownOption,
88 Boolean debugOutputOption)
|
89 h.sterling 1.1 {
90 // newPortNumber = "";
91 // pegasusTrace = "";
|
92 kumpf 1.4 return cimserver_run(argc, argv, shutdownOption, debugOutputOption);
|
93 h.sterling 1.1 }
94
95
|