Permalink
Browse files

commands: run bash command in new session.

Solve problems with running bash command in some environments.
Message:
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
may be ignored.
  • Loading branch information...
1 parent c79310a commit ee5dcb249f540e4bda9ecdd37d2310a8712bcf2c Karol Będkowski committed Jun 9, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 kupfer/plugin/commands.py
@@ -222,7 +222,7 @@ def __init__(self):
self._bash_cmds = bash_cmds = u';'.join(bash_cmds) + ";"
# get alias names
try:
- lines = check_output(('bash', '-i', '-c', bash_cmds + u'alias'))
+ lines = check_output(('setsid', 'bash', '-i', '-c', bash_cmds + u'alias'))
except OSError:
# no bash
pass
@@ -237,7 +237,7 @@ def __init__(self):
aliases.append(word[:word.find('=')])
# get function names
try:
- lines = check_output(('bash', '-i', '-c', bash_cmds + u'declare -F'))
+ lines = check_output(('setsid', 'bash', '-i', '-c', bash_cmds + u'declare -F'))
except OSError:
# no bash
pass

0 comments on commit ee5dcb2

Please sign in to comment.