4 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
6 * Licensed under the Apache License, Version 2.0 (the License);
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
21 #include <sys/reboot.h>
27 static void sig_quit(int signo)
29 _D("received SIGTERM signal %d", signo);
32 static void sig_usr1(int signo)
34 _D("received SIGUSR1 signal %d, coord will be finished!", signo);
36 ecore_main_loop_quit();
39 static int coord_main(int argc, char **argv)
41 edbus_init((void *)NULL);
42 coords_init((void *)NULL);
44 signal(SIGTERM, sig_quit);
45 signal(SIGUSR1, sig_usr1);
47 ecore_main_loop_begin();
49 coords_exit((void *)NULL);
50 edbus_exit((void *)NULL);
55 int main(int argc, char **argv)
58 return coord_main(argc, argv);