@@ -303,6 +303,9 @@ def create_best_pipe(escalates_privilege=False):
303303
304304 If SELinux is detected, fall back to using pipes.
305305
306+ :param bool escalates_privilege:
307+ If :data:`True`, the target program may escalate privileges, causing
308+ SELinux to disconnect AF_UNIX sockets, so avoid those.
306309 :returns:
307310 `(parent_rfp, child_wfp, child_rfp, parent_wfp)`
308311 """
@@ -344,7 +347,7 @@ def create_child(args, merge_stdio=False, stderr_pipe=False,
344347 :param bool merge_stdio:
345348 If :data:`True`, arrange for `stderr` to be connected to the `stdout`
346349 socketpair, rather than inherited from the parent process. This may be
347- necessary to ensure that not TTY is connected to any stdio handle, for
350+ necessary to ensure that no TTY is connected to any stdio handle, for
348351 instance when using LXC.
349352 :param bool stderr_pipe:
350353 If :data:`True` and `merge_stdio` is :data:`False`, arrange for
@@ -526,6 +529,15 @@ def hybrid_tty_create_child(args, escalates_privilege=False):
526529 like :func:`create_child`, but leave stderr and the controlling TTY
527530 attached to a TTY.
528531
532+ This permits high throughput communication with programs that are reached
533+ via some program that requires a TTY for password input, like many
534+ configurations of sudo. The UNIX TTY layer tends to have tiny (no more than
535+ 14KiB) buffers, forcing many IO loop iterations when transferring bulk
536+ data, causing significant performance loss.
537+
538+ :param bool escalates_privilege:
539+ If :data:`True`, the target program may escalate privileges, causing
540+ SELinux to disconnect AF_UNIX sockets, so avoid those.
529541 :param list args:
530542 Program argument vector.
531543 :returns:
@@ -765,7 +777,7 @@ def get_connection_class(name):
765777def _proxy_connect (name , method_name , kwargs , econtext ):
766778 """
767779 Implements the target portion of Router._proxy_connect() by upgrading the
768- local context to a parent if it was not already, then calling back into
780+ local process to a parent if it was not already, then calling back into
769781 Router._connect() using the arguments passed to the parent's
770782 Router.connect().
771783
@@ -1146,7 +1158,6 @@ class RegexProtocol(LineLoggingProtocolMixin, mitogen.core.DelimitedProtocol):
11461158 falling back to :meth:`on_unrecognized_line_received` and
11471159 :meth:`on_unrecognized_partial_line_received`.
11481160 """
1149-
11501161 #: A sequence of 2-tuples of the form `(compiled pattern, method)` for
11511162 #: patterns that should be matched against complete (delimited) messages,
11521163 #: i.e. full lines.
0 commit comments