Tests: Cleanup: notification: `assert()` that `app_pid` is set
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Wed, 12 Feb 2020 20:30:16 +0000 (15:30 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 4 Mar 2021 16:59:19 +0000 (11:59 -0500)
commit7344b6a307b62685272f8f5dacc42d4e06e5732f
tree769c18ef5c4a95e499f83530901e7e8c5a78330b
parent40ac67094a64b4399801074f2599e4a193445672
Tests: Cleanup: notification: `assert()` that `app_pid` is set

According to the kill(2) manpage:
  If pid equals -1, then sig is sent to every process for which the
  calling  process  has  permission  to  send  signals,  except for
  process 1 (init),

Since our current default value is -1, if we call the
`{suspend,resume}_application()` functions before setting the `app_pid`
we end up sending a signal to all processes owned by the user which can
be pretty dramatic.

If we are about to call `kill()` with -1, it's a logic error so we can
assert().

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I211f75d44e6cfdd2f2e35ef342b930eb683dbbe5
Depends-on: lttng-ust: I5a800fc92e588c2a6a0e26282b0ad5f31c044479
tests/regression/tools/notification/notification.c
This page took 0.026021 seconds and 4 git commands to generate.