Change the signal used by security-manager prepare_app implementation 45/295445/7
authorTomasz Swierczek <t.swierczek@samsung.com>
Fri, 7 Jul 2023 08:10:20 +0000 (10:10 +0200)
committerTomasz Swierczek <t.swierczek@samsung.com>
Mon, 10 Jul 2023 15:26:28 +0000 (15:26 +0000)
commit4e26238c9e62a442042145a42207c8b669bf939d
tree5d40ee5f79f43927ff99ae43bd20119708e6527e
parentbf89d32eb43bc118bafa411b74c131236e4f465a
Change the signal used by security-manager prepare_app implementation

SIGSETXID was used previously to mimic the exact behaviour of glibc.

However, in testing on VD side using SIGSETXID can cause interference
with regular glibc usage, which also leads to abort().

To give more details: if threads are so delayed that their signal handling
is done ie. > 2 seconds after the sending was done, the signal arrives
in the thread when security-manager already did change the signal handler
back to original glibc. Then, glibc, checks whether it sent the signal,
it recognizes it didn't, and aborts/quits.

Changing signal number will not cause glibc to abort/fail, and if execution
gets back to security-manager main thread, IT will fail, printing
all necessary information about threads for debugging, before calling abort().

Changed signal number to SIGRTMIN+2, as advised.

Change-Id: I9b755504898daee71997ee35023c3d647e332b84
src/client/client-security-manager.cpp