common: Add replacing fork/exec() to posix_spawn() 07/323507/2
authorYunhee Seo <yuni.seo@samsung.com>
Tue, 29 Apr 2025 05:48:02 +0000 (14:48 +0900)
committerYunhee Seo <yuni.seo@samsung.com>
Tue, 29 Apr 2025 11:55:47 +0000 (20:55 +0900)
commitc4236143e4b338d711fe3c57c1fdb8b5d92dc646
tree1c12cf6d64c7b1c237f807b03aa45e0959e741bf
parenta8d85427bea792a5e5e811b7901506215eab6008
common: Add replacing fork/exec() to posix_spawn()

As applying unified-system-service,
there was an issue about fork/exec operation in the thread.
Actually, forking() in the thread is undefined behavior.
Thus if the storaged started as a unified-system-service,
fork operation should be replaced to posix_spawn() which is
safer method.
It will ignore parents(thread) signal setting and operated.

Change-Id: I9630335e6c6f0cf5dcf8705066181d6b0b30e305
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
CMakeLists.txt
packaging/storaged.spec
src/shared/common.c