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

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2