* origin/dmw:
docs: merge signals.rst into internals.rst
os_fork: do not attempt to cork the active thread.
parent: fix get_log_level() for split out loggers.
issue #547: fix service_test failures.
issue #547: update Changelog.
issue #547: core/service: race/deadlock-free service pool init
docs: update Changelog.
select: make Select.add() handle multiple buffered items.
core/select: add {Select,Latch,Receiver}.size(), deprecate empty()
parent: docstring fixes
core: remove dead Router.on_shutdown() and Router "shutdown" signal
testlib: use lsof +E for much clearer leaked FD output
[stream-refactor] stop leaking FD 100 for the life of the child
core: split preserve_tty_fp() out into a function
parent: zombie reaping v3
issue #410: fix test failure due to obsolete parentfp/childfp
issue #170: replace Timer.cancelled with Timer.active
core: more descriptive graceful shutdown timeout error
docs: update changelog
core: fix Python2.4 crash due to missing Logger.getChild().
issue #410: automatically work around SELinux braindamage.
core: cache stream reference in DelimitedProtocol
parent: docstring formatting
docs: remove fakessh from home page, it's been broken forever
docs: add changelog thanks
Disable Azure pipelines build for docs-master too.
docs: udpate Changelog.
docs: tweak Changelog wording
[linear2] merge fallout: re-enable _send_module_forwards().
docs: another round of docstring cleanups.
master: allow filtering forwarded logs using logging package functions.
docs: many more internals.rst tidyups
tests: fix error in affinity_test
service: centralize fetching thread name, and tidy up logs
[stream-refactor] get caught up on internals.rst updates
Stop using mitogen root logger in more modules, remove unused loggers
tests: stop dumping Docker help output in the log.
parent: move subprocess creation to mux thread too
Split out and make readable more log messages across both packages
ansible: log affinity assignments
ci: log failed command line, and try enabling stdout line buffering
ansible: improve docstring
[linear2] simplify _listener_for_name()
ansible: stop relying on SIGTERM to shut down service pool
tests: move tty_create_child tests together
ansible: cleanup various docstrings
parent: define Connection behaviour during Broker.shutdown()
issue #549: ansible: reduce risk by capping RLIM_INFINITY
The previous method of spinning up a transient thread to import the
service pool in a child context could deadlock with use of the importer
on the main thread. Therefore wake the main thread to handle import for
us, and use a regular Receiver to buffer messages to the stub, which is
inherited rather than replaced by the real service pool.
Previously given something like:
l = mitogen.core.Latch()
l.put(1)
l.put(2)
s = mitogen.select.Select([l], oneshot=False)
assert 1 == s.get(block=False)
assert 2 == s.get(block=False)
The second call would throw TimeoutError, because Select.add() only
queued the receiver/latch once if it was non-empty, rather than once for
each item as should happen.
Its functionality was duplicated by _on_broker_exit() somewhere along
the way, and nothing has referred to it in a long time. I have no idea
how this happened.
Merge its docstring into _on_broker_exit() and delete it, remove the
Router "shutdown" signal after confirming it has no users, and move all
the Router-originated error messages together in a block at the top of
the class.
Already covered by router_test.AddHandlerTest.test_dead_message_sent_at_shutdown
Stream.set_protocol() was updated to break the reference on the previous
protocol, to encourage a crash should an old protocol continue operating
after it's not supposed to be active any more.
That broke DelimitedProtocol's protocol switching functionality.
Given a message sent on "ssh.foo" to "mypkg.mymod", instead of logging
it to "mitogen.ctx.ssh.foo" in the master process, with the message
prefixed with the original logger name, instead log it to
"mypkg.mymod.[ssh.foo]", permitting normal logging package filtering
features to work as they usually do.
This also helps tidy up logging output a little bit.
It's no longer necessary, since connection attempts are no longer truly
blocking. When CTRL+C is hit in the top-level process, broker will begin
shutdown, which will cancel all pending connection attempts, causing
pool threads to wake. The pool can't block during shutdown anymore.