Skip to content

Commit

Permalink
Name the processes.
Browse files Browse the repository at this point in the history
  • Loading branch information
s0undt3ch committed Nov 30, 2019
1 parent 86b1722 commit 6512a2f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions salt/client/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,7 @@ def asynchronous(self, fun, low, user='UNKNOWN', pub=None):
async_pub = pub if pub is not None else self._gen_async_pub()
proc = salt.utils.process.SignalHandlingProcess(
target=self._proc_function,
name='ProcessFunc',
args=(fun, low, user, async_pub['tag'], async_pub['jid']))
with salt.utils.process.default_signals(signal.SIGINT, signal.SIGTERM):
# Reset current signals before starting the process in
Expand Down
4 changes: 3 additions & 1 deletion salt/metaproxy/proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,9 @@ def handle_decoded_payload(self, data):
instance = None
with default_signals(signal.SIGINT, signal.SIGTERM):
process = SignalHandlingProcess(
target=self._target, args=(instance, self.opts, data, self.connected)
target=self._target,
name='ProcessPayload',
args=(instance, self.opts, data, self.connected)
)
else:
process = threading.Thread(
Expand Down
4 changes: 3 additions & 1 deletion salt/minion.py
Original file line number Diff line number Diff line change
Expand Up @@ -1525,7 +1525,9 @@ def _handle_decoded_payload(self, data):
instance = None
with default_signals(signal.SIGINT, signal.SIGTERM):
process = SignalHandlingProcess(
target=self._target, args=(instance, self.opts, data, self.connected)
target=self._target,
name='ProcessPayload',
args=(instance, self.opts, data, self.connected)
)
else:
process = threading.Thread(
Expand Down

0 comments on commit 6512a2f

Please sign in to comment.