diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-04-06 05:47:57 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-04-06 05:47:57 +0200 |
commit | 3c9df4ef895e5ba275001fad037e8aeeabf1680a (patch) | |
tree | 334f59fbdd1d483e3903bc784c42b0aa6c82a8c0 | |
parent | bump version (diff) | |
download | blueshift-3c9df4ef895e5ba275001fad037e8aeeabf1680a.tar.gz blueshift-3c9df4ef895e5ba275001fad037e8aeeabf1680a.tar.bz2 blueshift-3c9df4ef895e5ba275001fad037e8aeeabf1680a.tar.xz |
remove path from process title
Signed-off-by: Mattias Andrée <maandree@operamail.com>
-rwxr-xr-x | src/__main__.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/__main__.py b/src/__main__.py index cf4d619..54c8e94 100755 --- a/src/__main__.py +++ b/src/__main__.py @@ -54,6 +54,12 @@ def setproctitle(title): ''' import ctypes try: + # Remove path, keep only the file, + # otherwise we get really bad effects, namely + # the name title is truncates by the number + # of slashes in the title. At least that is + # the observed behaviour when using procps-ng. + title = title.split('/')[-1] # Create strng buffer with title title = title.encode(sys.getdefaultencoding(), 'replace') title = ctypes.create_string_buffer(title) |