Commit graph

31506 commits

Author SHA1 Message Date
Keun-young Park
b28221be05 Merge "send SIGTERM only once" am: 9ead7c4a74 am: ba54f32b0a am: 72d44ae00c
am: 1bcca04d6b

Change-Id: I4dcc796986e060200ba4981d31b1490aa7766b1a
2017-03-30 04:21:34 +00:00
Keun-young Park
1bcca04d6b Merge "send SIGTERM only once" am: 9ead7c4a74 am: ba54f32b0a
am: 72d44ae00c

Change-Id: I31b6064ae5625a1f6cd1b34c57085a18d870be27
2017-03-30 04:19:35 +00:00
Keun-young Park
72d44ae00c Merge "send SIGTERM only once" am: 9ead7c4a74
am: ba54f32b0a

Change-Id: Ib13d0285f00b224cffdc4b23552d0196c0c0f697
2017-03-30 04:17:35 +00:00
Keun-young Park
ba54f32b0a Merge "send SIGTERM only once"
am: 9ead7c4a74

Change-Id: I87ac8e4402207719dd6cebb05adc0a3e1c2afbfe
2017-03-30 04:15:04 +00:00
Treehugger Robot
9ead7c4a74 Merge "send SIGTERM only once" 2017-03-30 04:10:41 +00:00
Keun-young Park
8eff59d6bc Merge "add killProcessGroupOnce" am: c8a575588a am: d140cc9bf3 am: cb52d51488
am: 60ffe0541c

Change-Id: Ied96769f098fabf57aca6970b2f57a399373a9ab
2017-03-30 02:07:57 +00:00
Keun-young Park
60ffe0541c Merge "add killProcessGroupOnce" am: c8a575588a am: d140cc9bf3
am: cb52d51488

Change-Id: I54d3233c0710b0edff2c23975ce8f5dee756eccb
2017-03-30 01:58:55 +00:00
Keun-young Park
cb52d51488 Merge "add killProcessGroupOnce" am: c8a575588a
am: d140cc9bf3

Change-Id: I3eed238ea53e497d3108ea21919522c235e9830a
2017-03-30 01:56:55 +00:00
Keun-young Park
d140cc9bf3 Merge "add killProcessGroupOnce"
am: c8a575588a

Change-Id: I5382136149b2d7916fe3d891fe04fd79ade97bb2
2017-03-30 01:55:24 +00:00
Treehugger Robot
c8a575588a Merge "add killProcessGroupOnce" 2017-03-30 01:46:59 +00:00
Sandeep Patil
2d1e714b61 Merge "init: consolidate restorecon after selinux initialization in single function" am: 273a0624c5 am: 68fb7c0bbb am: fb79b10200 -s ours
am: 4592b91f50

Change-Id: I4dfd467042f88821f88b1b3919ff06a489b9716f
2017-03-30 01:08:43 +00:00
Sandeep Patil
4592b91f50 Merge "init: consolidate restorecon after selinux initialization in single function" am: 273a0624c5 am: 68fb7c0bbb
am: fb79b10200  -s ours

Change-Id: I661b60f4e32c6fd7524a49506fa8aa071fadc6e0
2017-03-30 01:06:41 +00:00
Sandeep Patil
fb79b10200 Merge "init: consolidate restorecon after selinux initialization in single function" am: 273a0624c5
am: 68fb7c0bbb

Change-Id: I2189cbff8e97b3aaa5bd335806d5d1ea9ea21225
2017-03-30 00:53:50 +00:00
Sandeep Patil
68fb7c0bbb Merge "init: consolidate restorecon after selinux initialization in single function"
am: 273a0624c5

Change-Id: I417d2bee37d91fa27eb7819ef463552d48c1f36d
2017-03-30 00:51:50 +00:00
Treehugger Robot
273a0624c5 Merge "init: consolidate restorecon after selinux initialization in single function" 2017-03-30 00:48:04 +00:00
Wei Wang
44a470d79a libcutils: remove schedgroup fds [DO NOT MERGE] am: bcb6419fc9 -s ours am: 80de24f484 -s ours
am: 4bdc339f2b

Change-Id: Ie91e6c4dee82ede58dd9cf9a0193936c7d1dd487
2017-03-30 00:20:44 +00:00
Wei Wang
4bdc339f2b libcutils: remove schedgroup fds [DO NOT MERGE] am: bcb6419fc9 -s ours
am: 80de24f484  -s ours

Change-Id: If6a2b2493fa655a6495e7ec2296f9516041aeac1
2017-03-30 00:15:56 +00:00
Wei Wang
17a1b81f92 libcutils: remove schedgroup fds [DO NOT MERGE] am: bcb6419fc9 -s ours am: 058188d345
am: 3105628570

Change-Id: I986b7b0528495f5d554cfb7c02db5a034994899e
2017-03-30 00:11:51 +00:00
Wei Wang
80de24f484 libcutils: remove schedgroup fds [DO NOT MERGE]
am: bcb6419fc9  -s ours

Change-Id: Ib8af1c5c4066d280811211c28c9388574813028d
2017-03-30 00:06:17 +00:00
Wei Wang
3105628570 libcutils: remove schedgroup fds [DO NOT MERGE] am: bcb6419fc9 -s ours
am: 058188d345

Change-Id: Idea874d7b616b6e183d1e76f891b298a6e0f0668
2017-03-30 00:05:51 +00:00
Wei Wang
058188d345 libcutils: remove schedgroup fds [DO NOT MERGE]
am: bcb6419fc9  -s ours

Change-Id: I0ff94dc5292e12d4c2626d5049553b19514ad1ed
2017-03-30 00:02:16 +00:00
Keun-young Park
acd55b39fe send SIGTERM only once
- Processes capturing SIGTERM signal will not terminate and
  killProcessGroup will timeout after retry. This gives 200ms
  of waiting per such process. Change it to retry only once as
  SIGTERM will keep failing for such process.

bug: 36696408
Test: check time spent in SIGTERM for reboot
Change-Id: I9b0843614598dd3f97a50b21352046297ed70b6b
2017-03-29 16:33:25 -07:00
Keun-young Park
fac4b63eff add killProcessGroupOnce
- killProcessGroup retries if it fails while
  killProcessGroupOnce only tries once.
- useful for sending signal like SIGTERM once.

bug: 36696408
Test: will add usage to init
Change-Id: Ia1e3d4ec848e785a3238f262b02914695cded4c7
2017-03-29 16:33:15 -07:00
Tom Cherry
eaf8349c8d Merge changes from topic 'update-verified-priority-bump' into oc-dev am: 5f12c799a5 -s ours
am: 2f9fb4f290

Change-Id: I128f025cd79fc81cb4c475e6d7b635fdd8241164
2017-03-29 23:18:44 +00:00
Tom Cherry
2f9fb4f290 Merge changes from topic 'update-verified-priority-bump' into oc-dev
am: 5f12c799a5  -s ours

Change-Id: I87158327dc482a0063c3f20a5e6f68287f2e87b0
2017-03-29 23:17:18 +00:00
Mathias Agopian
c46e3c1b3d Merge "split LightRefBase out of RefBase" into oc-dev am: ed6aad1cbb
am: 15b290bf7b

Change-Id: I7b26f9285534be125a901039815c80f810747a41
2017-03-29 23:14:58 +00:00
Mathias Agopian
15b290bf7b Merge "split LightRefBase out of RefBase" into oc-dev
am: ed6aad1cbb

Change-Id: Ie976eb317714023fd56bced28fb605691ce4a7b3
2017-03-29 23:13:01 +00:00
TreeHugger Robot
5f12c799a5 Merge changes from topic 'update-verified-priority-bump' into oc-dev
* changes:
  init.rc: launch update_verifier with exec_start
  init: replace property_get with its android::base equivalent
  init: remove unused cutils includes
  init: add exec_start command
2017-03-29 23:12:22 +00:00
Mathias Agopian
ed6aad1cbb Merge "split LightRefBase out of RefBase" into oc-dev 2017-03-29 23:08:15 +00:00
Sandeep Patil
7ef60b4ed4 init: consolidate restorecon after selinux initialization in single function
Test: Boot sailfish
Change-Id: I423028f12a84c4e0c12c9bdde52b6d795d45b620
(cherry picked from commit 74df5bab16)
Signed-off-by: Sandeep Patil <sspatil@google.com>
2017-03-29 16:01:31 -07:00
Sandeep Patil
2962e1718e init: explicitly label all selinux files in rootfs am: f5b99d4fe2
am: a02393d472

Change-Id: I188b5c4c2d90cb24e37c56be42589bccf69cb8f5
2017-03-29 21:58:51 +00:00
Sandeep Patil
a02393d472 init: explicitly label all selinux files in rootfs
am: f5b99d4fe2

Change-Id: I0592c29f186f3baa69462a040765189534da189c
2017-03-29 21:54:51 +00:00
Keun-young Park
4aa20f22b9 Merge "set zero shutdown timeout for eng build" am: 6fb2ef1d03 am: 5579d46471 am: 6ae0a9eeeb
am: c7d933a2af

Change-Id: I81b7410e61f8137092ca1697d8a120fa67c0d9a8
2017-03-29 21:37:53 +00:00
Wei Wang
bcb6419fc9 libcutils: remove schedgroup fds [DO NOT MERGE]
After removing bg_non_interactive cgroup, there is only a ROOT cgroup.
This CL removes the no-op trying to set cgroup.
It also removes the attempt to open non-exist bg_non_interactive cgroup.

Bug: 36649832
Test: marlin boosts and cgroup ROOT task looks normal
Change-Id: Idef1dfdaa71fde63c98c73a3d37f65416aa6f2e2
2017-03-29 14:34:46 -07:00
Keun-young Park
c7d933a2af Merge "set zero shutdown timeout for eng build" am: 6fb2ef1d03 am: 5579d46471
am: 6ae0a9eeeb

Change-Id: I13d420a4046b5bcf2ff4d161eec82fdb6a5fd0f6
2017-03-29 21:33:36 +00:00
Keun-young Park
6ae0a9eeeb Merge "set zero shutdown timeout for eng build" am: 6fb2ef1d03
am: 5579d46471

Change-Id: I10fe8d29054c15220a4a354eb3629353d307cc9d
2017-03-29 21:31:37 +00:00
Keun-young Park
5579d46471 Merge "set zero shutdown timeout for eng build"
am: 6fb2ef1d03

Change-Id: Id9fbc2ad91d6e337be7e39ab747187427e69003f
2017-03-29 21:29:37 +00:00
Treehugger Robot
6fb2ef1d03 Merge "set zero shutdown timeout for eng build" 2017-03-29 21:25:19 +00:00
Sandeep Patil
ab4730ba82 init: consolidate restorecon after selinux initialization in single function am: 74df5bab16
am: 0f62ea302e

Change-Id: I0e7e79d9ad59f4ef9c47c6543509ed239a8d4017
2017-03-29 21:20:21 +00:00
Sandeep Patil
0f62ea302e init: consolidate restorecon after selinux initialization in single function
am: 74df5bab16

Change-Id: Ie6b93289ae814de6e30afe6c490dfcb27f693927
2017-03-29 21:18:22 +00:00
Mathias Agopian
44cee05904 split LightRefBase out of RefBase
Bug: 36532900
Test: compiled
Change-Id: I3088e1a219e04cf924744d3a0c2d374918bb6395
2017-03-29 20:39:06 +00:00
Tom Cherry
aaeb792312 init.rc: launch update_verifier with exec_start
This allows update_verifier to raise it's priority and ioprio.

Bug: 36511808
Bug: 36102163
Test: Boot bullhead
Test: Verify boottime decrease on sailfish
Change-Id: I5710c6a98dc7acee9063d1fa1d1c80668f0f1528
(cherry picked from commit 1e2d8c7fce)
2017-03-29 13:37:54 -07:00
Tom Cherry
e249097f6d init: replace property_get with its android::base equivalent
Slowly try to decouple property_service.cpp from the rest of init.

Test: Boot bullhead
Change-Id: I267ae0b057bca0bf657b97cb8bfbb18199282729
(cherry picked from commit ccf23537ee)
2017-03-29 13:34:56 -07:00
Tom Cherry
af5102a4f0 init: remove unused cutils includes
Test: Boot bullhead
Change-Id: I629f9c3863f00fa38f87a68442c2380d28764718
(cherry picked from commit 1ec1bd918c)
2017-03-29 13:34:52 -07:00
Tom Cherry
2d80467165 init: add exec_start command
Exec services may also want to set other service flags such as
priority.  Instead of expanding the exec syntax to handle this, create
a new command, exec_start, that will treat an existing service
definition as an exec service.  The new exec_start command will start
the service then halt init from executing further commands until the
service has exited.

This change additionally encapsulates the waiting_for_exec logic into
ServiceManager and removes the ambiguous 'bool' return value from
Reap() which previously indicated if a Reaped service was an exec
service or not.

Bug: 36511808
Bug: 36102163
Test: Bullhead boots, services run with exec_start as they do exec.

Change-Id: I44f775cf1c1dd81d5c715f44fdc150c651a2c80a
(cherry picked from commit b27004aa05)
2017-03-29 13:34:48 -07:00
Keun-young Park
c4ffa5c47d set zero shutdown timeout for eng build
- still it will take time to kill services, < 3 secs in tested device.

bug: 36678028
Test: reboot
Change-Id: I3f3eb83aede8cd950da12e3fcc259eeaf8517c3b
2017-03-29 12:25:33 -07:00
Tom Cherry
2abd426db5 Merge changes from topic 'exec-start-update-verifier' am: 8772b3686e am: 571cb53797 am: 5b591daf83
am: 61c5bdf6de

Change-Id: If9cbd6310b9c7ba075be62da0ab32aef4ca93e8c
2017-03-29 19:03:21 +00:00
Tom Cherry
bcba3cfc18 init: add exec_start command am: b27004aa05 am: 64cb3d5c62 am: 51579e8664
am: 1cf1a8e95e

Change-Id: Ifece777f9121ba5460a94340e19116bae568367c
2017-03-29 19:03:14 +00:00
Tom Cherry
1764608e6f Merge "init: replace property_get with its android::base equivalent" am: 7bcce1e3c0 am: 6ee34f0286 am: b324ffeb79
am: 458e9218d8

Change-Id: I8ed462c9ea581361e449e3549f37667b61d579b2
2017-03-29 19:02:55 +00:00
Tom Cherry
61c5bdf6de Merge changes from topic 'exec-start-update-verifier' am: 8772b3686e am: 571cb53797
am: 5b591daf83

Change-Id: I9b6a559f4295dd25e84d17e89d93ee0cb3c3a7f2
2017-03-29 18:49:24 +00:00