2 * Copyright (c) 2012 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 /* standard library header */
29 /* SLP library header */
34 #include "ServerResource.h"
35 #include "ServerSEService.h"
39 using namespace smartcard_service_api;
43 ServerResource *serverResource = NULL;
45 static void daemonize(void)
49 /* already a daemon */
53 /* Fork off the parent process */
62 exit(EXIT_SUCCESS); /*Killing the Parent Process*/
65 /* At this point we are executing as the child process */
68 /* Create a new SID for the child process */
75 /* Change the current working directory. */
88 GMainLoop* loop = NULL;
92 if (!g_thread_supported())
97 serverResource = &ServerResource::getInstance();
98 ServerIPC::getInstance()->createListenSocket();
100 loop = g_main_new(TRUE);
101 g_main_loop_run(loop);