[systemd] reboot optimization when usb is connected
authorbaik <knhoon.baik@samsung.com>
Fri, 28 Dec 2012 07:12:11 +0000 (16:12 +0900)
committerbaik <knhoon.baik@samsung.com>
Fri, 28 Dec 2012 07:12:11 +0000 (16:12 +0900)
when usb is connected, system-server launch usb-server.
usb-server has some strange codes below.

 70         while(1) {
 71                 ret = usb_server_main(argc, argv);
 72                 if (ret == 0) break;
 73         }

So, although usb-server got SIGTERM, they will not be termed.

Almost reboot was happened without usb.
So, send SIGKILL as making timeout when user is connecnted.

Change-Id: Id51d8cd167637433849db73deac35fe38e4cb662

packaging/system-server.service

index cc5b2ae..9024501 100644 (file)
@@ -5,6 +5,7 @@ Description=Start the system server service
 # set DISPLAY for usb_setting launching
 Environment=DISPLAY=:0
 ExecStart=/usr/bin/system_server
+TimeoutSec=2
 
 [Install]
 WantedBy=multi-user.target