Skip to content

Commit

Permalink
Typos
Browse files Browse the repository at this point in the history
  • Loading branch information
jcea committed Dec 15, 2017
1 parent b8cfcae commit 7dd9d74
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 15 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Changelog
1.5.0 (2017-08-31)
------------------

* Added two string aliases for ``connection_handler`` option. Now you can convieniently use ``connection_handler="exec"``.
* Added two string aliases for ``connection_handler`` option. Now you can conveniently use ``connection_handler="exec"``.
* Improved ``handle_connection_exec``. It now has a clean way to exit (``exit()``) and properly closes the socket.

1.4.0 (2017-08-29)
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ When `reporting a bug <https://github.com/ionelmc/python-manhole/issues>`_ pleas
Documentation improvements
==========================

manhole could always use more documentation, whether as part of the
Manhole could always use more documentation, whether as part of the
official manhole docs, in docstrings, or even on the web in blog posts,
articles, and such.

Expand Down
17 changes: 10 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ Sample output::
Alternative client
------------------

There's a new experimental ``manhole`` bin since 1.1.0, that emulates ``socat``::
There's a new experimental ``manhole-cli`` bin since 1.1.0, that emulates ``socat``::

usage: manhole [-h] [-t TIMEOUT] [-1 | -2] PID
usage: manhole-cli [-h] [-t TIMEOUT] [-1 | -2 | -s SIGNAL] PID

Connect to a manhole.

Expand All @@ -142,6 +142,9 @@ There's a new experimental ``manhole`` bin since 1.1.0, that emulates ``socat``:
Timeout to use. Default: 1 seconds.
-1, -USR1 Send USR1 (10) to the process before connecting.
-2, -USR2 Send USR2 (12) to the process before connecting.
-s SIGNAL, --signal SIGNAL
Send the given SIGNAL to the process before
connecting.

.. end-badges
Expand Down Expand Up @@ -184,17 +187,17 @@ Options
unbuffered stderr (stderr ``2`` file descriptor).
* ``patch_fork`` - Set it to ``False`` if you don't want your ``os.fork`` and ``os.forkpy`` monkeypatched
* ``activate_on`` - Set to ``"USR1"``, ``"USR2"`` or some other signal name, or a number if you want the Manhole thread
to start when this signal is sent. This is desireable in case you don't want the thread active all the time.
to start when this signal is sent. This is desirable in case you don't want the thread active all the time.
* ``thread`` - Set to ``True`` to start the always-on ManholeThread. Default: ``True``.
Automatically switched to ``False`` if ``oneshot_on`` or ``activate_on`` are used.
* ``oneshot_on`` - Set to ``"USR1"``, ``"USR2"`` or some other signal name, or a number if you want the Manhole to
listen for connection in the signal handler. This is desireable in case you don't want threads at all.
* ``sigmask`` - Will set the signal mask to the given list (using ``signalfd.sigprocmask``). No action is done if
``signalfd`` is not importable. **NOTE**: This is done so that the Manhole thread doesn't *steal* any signals;
Normally that is fine cause Python will force all the signal handling to be run in the main thread but signalfd
Normally that is fine because Python will force all the signal handling to be run in the main thread but signalfd
doesn't.
* ``socket_path`` - Use a specifc path for the unix domain socket (instead of ``/tmp/manhole-<pid>``). This disables
``patch_fork`` as children cannot resuse the same path.
* ``socket_path`` - Use a specific path for the unix domain socket (instead of ``/tmp/manhole-<pid>``). This disables
``patch_fork`` as children cannot reuse the same path.
* ``reinstall_delay`` - Delay the unix domain socket creation *reinstall_delay* seconds. This alleviates
cleanup failures when using fork+exec patterns.
* ``locals`` - Names to add to manhole interactive shell locals.
Expand Down Expand Up @@ -225,7 +228,7 @@ What happens when you actually connect to the socket
----------------------------------------------------

1. Credentials are checked (if it's same user or root)
2. ``sys.__std*__``/``sys.std*`` are be redirected to the UDS
2. ``sys.__std*__``/``sys.std*`` are redirected to the UDS
3. Stacktraces for each thread are written to the UDS
4. REPL is started so you can fiddle with the process

Expand Down
12 changes: 6 additions & 6 deletions src/manhole/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ class ManholeThread(_ORIGINAL_THREAD):
exits.
On connect, a different, non-daemon thread will be started - so that the process won't exit while there's a
connection to the manole.
connection to the manhole.
Args:
sigmask (list of singal numbers): Signals to block in this thread.
sigmask (list of signal numbers): Signals to block in this thread.
start_timeout (float): Seconds to wait for the thread to start. Emits a message if the thread is not running
when calling ``start()``.
bind_delay (float): Seconds to delay socket binding. Default: `no delay`.
Expand Down Expand Up @@ -371,7 +371,7 @@ class Logger(object):
"""
Internal object used for logging.
Initially this is not configured. Until you call ``manhole.install()`` this logger object won't work (will raise
Initially this is not configured. Until you call ``manhole.install()``, this logger object won't work (will raise
``NotInstalled``).
"""
time = _get_original('time', 'time')
Expand Down Expand Up @@ -585,10 +585,10 @@ def install(verbose=True,
``oneshort_on`` or ``activate_on`` are used.
sigmask (list of ints or signal names): Will set the signal mask to the given list (using
``signalfd.sigprocmask``). No action is done if ``signalfd`` is not importable.
**NOTE**: This is done so that the Manhole thread doesn't *steal* any signals; Normally that is fine cause
**NOTE**: This is done so that the Manhole thread doesn't *steal* any signals; Normally that is fine because
Python will force all the signal handling to be run in the main thread but signalfd doesn't.
socket_path (str): Use a specifc path for the unix domain socket (instead of ``/tmp/manhole-<pid>``). This
disables ``patch_fork`` as children cannot resuse the same path.
socket_path (str): Use a specific path for the unix domain socket (instead of ``/tmp/manhole-<pid>``). This
disables ``patch_fork`` as children cannot reuse the same path.
reinstall_delay (float): Delay the unix domain socket creation *reinstall_delay* seconds. This
alleviates cleanup failures when using fork+exec patterns.
locals (dict): Names to add to manhole interactive shell locals.
Expand Down

0 comments on commit 7dd9d74

Please sign in to comment.