1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
12 int main(int argc
, char ** argv
) {
24 /* child (daemon) continues */
26 for (j
= 0; j
< sysconf(_SC_OPEN_MAX
); j
++)
29 setsid(); /* obtain a new process group */
34 stat("/sdcard/host_heartbeat", &ft
);
36 if (ct
- ft
.st_mtime
> 120) {
37 /* File was not touched for some time. */
38 system("su -c reboot");