Thread names at the process level are limited by 15 characters: https://github.com/bitcoin/bitcoin/blob/6b2210f1016c9ed96ce470e588e4cb12fa36a900/src/util/threadnames.cpp#L28-L29
This commit ensures that name b-httpworker.42
will not be truncated.
On master (6b2210f1016c9ed96ce470e588e4cb12fa36a900):
0hebasto@redcat:~$ ps -T -p $(cat /home/hebasto/.bitcoin/testnet3/bitcoind.pid)
1 PID SPID TTY TIME CMD
232647 32647 pts/6 00:00:00 bitcoin-main
332647 32648 pts/6 00:00:00 QXcbEventReader
432647 32649 pts/6 00:00:00 bitcoin:disk$0
532647 32650 pts/6 00:00:00 QDBusConnection
632647 32651 pts/6 00:00:00 gmain
732647 32652 pts/6 00:00:00 gdbus
832647 32653 pts/6 00:00:07 bitcoin-qt-init
932647 32656 pts/6 00:00:00 bitcoin-scriptc
1032647 32657 pts/6 00:00:00 bitcoin-scriptc
1132647 32658 pts/6 00:00:00 bitcoin-scriptc
1232647 32659 pts/6 00:00:00 bitcoin-schedul
1332647 32660 pts/6 00:00:00 bitcoin-http
1432647 32661 pts/6 00:00:00 bitcoin-httpwor
1532647 32662 pts/6 00:00:00 bitcoin-httpwor
1632647 32663 pts/6 00:00:00 bitcoin-httpwor
1732647 32664 pts/6 00:00:00 bitcoin-httpwor
1832647 32665 pts/6 00:00:00 bitcoin-qt-init
1932647 32668 pts/6 00:00:00 bitcoin-torcont
2032647 32669 pts/6 00:00:00 bitcoin-upnp
2132647 32670 pts/6 00:00:00 bitcoin-net
2232647 32671 pts/6 00:00:00 bitcoin-dnsseed
2332647 32672 pts/6 00:00:00 bitcoin-addcon
2432647 32673 pts/6 00:00:00 bitcoin-opencon
2532647 32674 pts/6 00:00:00 bitcoin-msghand
2632647 32675 pts/6 00:00:00 QThread
2732647 32676 pts/6 00:00:00 QThread
With this PR:
0hebasto@redcat:~$ ps -T -p $(cat /home/hebasto/.bitcoin/testnet3/bitcoind.pid)
1 PID SPID TTY TIME CMD
225664 25664 pts/0 00:00:00 b-main
325664 25665 pts/0 00:00:00 QXcbEventReader
425664 25666 pts/0 00:00:00 bitcoin:disk$0
525664 25667 pts/0 00:00:00 QDBusConnection
625664 25668 pts/0 00:00:00 gmain
725664 25669 pts/0 00:00:00 gdbus
825664 25670 pts/0 00:00:07 b-qt-init
925664 25671 pts/0 00:00:00 b-scriptch.0
1025664 25672 pts/0 00:00:00 b-scriptch.1
1125664 25673 pts/0 00:00:00 b-scriptch.2
1225664 25674 pts/0 00:00:00 b-scheduler
1325664 25675 pts/0 00:00:00 b-http
1425664 25676 pts/0 00:00:00 b-httpworker.0
1525664 25677 pts/0 00:00:00 b-httpworker.1
1625664 25678 pts/0 00:00:00 b-httpworker.2
1725664 25679 pts/0 00:00:00 b-httpworker.3
1825664 25680 pts/0 00:00:00 b-qt-init
1925664 25682 pts/0 00:00:00 b-torcontrol
2025664 25683 pts/0 00:00:00 b-upnp
2125664 25684 pts/0 00:00:00 b-net
2225664 25685 pts/0 00:00:00 b-dnsseed
2325664 25686 pts/0 00:00:00 b-addcon
2425664 25687 pts/0 00:00:00 b-opencon
2525664 25688 pts/0 00:00:01 b-msghand
2625664 25689 pts/0 00:00:00 QThread
2725664 25690 pts/0 00:00:00 QThread