diff --git a/RELNOTES b/RELNOTES index 1e030d6f9..fd4647142 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,6 +10,8 @@ Factoids' config variable supybot.plugins.Factoids.factoidPrefix has been replaced by supybot.plugins.Factoids.format, which allows the user to determine exactly how replies to Factoid queries are formatted. +supybot-botchk no longer runs supybot inside an instance of /bin/sh. + Version 0.83.4.1 diff --git a/scripts/supybot-botchk b/scripts/supybot-botchk index d61a96e81..f7f262ca8 100644 --- a/scripts/supybot-botchk +++ b/scripts/supybot-botchk @@ -122,21 +122,14 @@ if __name__ == '__main__': debug('pidfile (%s) is not writable: %s' % (options.pidfile, e)) sys.exit(-1) debug('Bot not found, starting.') - home = os.environ['HOME'] - inst = subprocess.Popen('sh', close_fds=True, stderr=subprocess.STDOUT, - stdin=subprocess.PIPE, stdout=subprocess.PIPE) - for filename in ('.login', '.bash_profile', '.profile', '.bashrc'): - filename = os.path.join(home, filename) - if os.path.exists(filename): - debug('Found %s, sourcing.' % filename) - inst.stdin.write('source %s' % filename + os.linesep) - cmdline = '%s --daemon %s' % (options.supybot, options.conffile) - debug('Sending cmdline to sh process.') - inst.stdin.write(cmdline + os.linesep) - inst.stdin.close() - debug('Received from sh process: %r' % inst.stdout.read()) + cmdline = [options.supybot, '--daemon', options.conffile] + inst = subprocess.Popen(cmdline, close_fds=True, + stderr=subprocess.STDOUT, + stdin=None, stdout=subprocess.PIPE) + debug('Output from supybot: %r' % inst.stdout.read()) ret = inst.wait() - debug('Bot started, command line %r returned %s.' % (cmdline, ret)) + debug('Bot started, command line %r returned %s.' % (' '.join(cmdline), + ret)) sys.exit(ret) else: sys.exit(0)