]> granicus.if.org Git - procps-ng/commit
top: only use 'pthread_sigmask' under separate threads
authorJim Warner <james.warner@comcast.net>
Thu, 14 Oct 2021 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@dropbear.xyz>
Mon, 18 Oct 2021 06:38:43 +0000 (17:38 +1100)
commit5d0987548899828b8ca658cba3cedb1197ef540b
tree09af7c0dcdd5077a590096c17415bad369af3c1f
parent0496b39876d569fe1cecb76ad5ef212cd14c0374
top: only use 'pthread_sigmask' under separate threads

When multi-threading was introduced in the patch shown
below, the former calls to sigprocmask were traded for
a pthread_sigmask call. This was done unconditionally.

As a result, even when those threads weren't enabled a
need to link with libpthread was created. In hindsight
the need should only arise when top is multi-threaded.

This commit will make pthread_sigmask use conditional.

Reference(s):
. 09/2021, separate threads introduced
commit 29f0a674a85bfb92443c56f070956a7dd60bb5f7

Signed-off-by: Jim Warner <james.warner@comcast.net>
top/top.c