Make logctl lock the config file 80/232280/2
authorMateusz Majewski <m.majewski2@samsung.com>
Wed, 29 Apr 2020 14:30:01 +0000 (16:30 +0200)
committerMateusz Majewski <m.majewski2@samsung.com>
Wed, 29 Apr 2020 15:06:49 +0000 (17:06 +0200)
commitbc43ddcc04d08d740eb2fda057ac4f50ff416f3b
treea4addb5fabc18c1ac7520958807671fea5e119d3
parentd2eb15ed8397af87d1c4ad2ab0b7a7ed7b2d2441
Make logctl lock the config file

Somebody pointed out that, if two logctls are launched simultanously,
it may result in a race condition and one of the changes dropped. Our
minds quickly flocked to a solution in which we use exclusive locks to
lock the file on write. This means we will always see the file in a
consistent state.

Change-Id: I5062bdcddc6c880bfd11ec66dad9cc4927e0536b
src/logctl/logctl.c