(file) Return to cimserver_unix.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Server

 1 mike  1.5 //%/////////////////////////////////////////////////////////////////////////////
 2           //
 3           // Copyright (c) 2000, 2001 The Open group, BMC Software, Tivoli Systems, IBM
 4           //
 5           // Permission is hereby granted, free of charge, to any person obtaining a copy
 6           // of this software and associated documentation files (the "Software"), to 
 7           // deal in the Software without restriction, including without limitation the 
 8           // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 
 9           // sell copies of the Software, and to permit persons to whom the Software is
10           // furnished to do so, subject to the following conditions:
11           // 
12           // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN 
13           // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
14           // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
15           // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 
16           // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 
17           // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 
18           // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
19           // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20           //
21           //==============================================================================
22 mike  1.5 //
23           // Author: Mike Day (mdday@us.ibm.com)
24           //
25           // Modified By:
26           //
27           //%/////////////////////////////////////////////////////////////////////////////
28           
29           #include <sys/types.h>
30           #include <sys/stat.h>
31           #include <fcntl.h>
32           #include <unistd.h>
33           
34           PEGASUS_USING_PEGASUS;
35           PEGASUS_USING_STD;
36           
37           void cim_server_service(int argc, char **argv ) { return; }  
38           unsigned int cimserver_remove_nt_service(void) { return(0) ; }
39           unsigned int cimserver_install_nt_service(String &pegasusHome ) { return(0) ; }
40           
41           // daemon_init , RW Stevens, "Advance UNIX Programming"
42           
43 mike  1.5 int cimserver_fork(void) 
44           { 
45             pid_t pid;
46             if( (pid = fork() ) < 0) 
47               return(-1);
48             else if (pid != 0)
49               exit(0);
50             
51             setsid();
52             umask(0);
53             return(0);
54           }
55           

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2