Hi,

I have ran into a problem several times now when using the Tk interface. If
the site locks up I am unable to kill the application in an easy way. One
primary reason is the -SIGTERM id is not present when using the GUI like it
is when running command line.

I have just tested this update and it works.

If you move the following line:
print 'use "kill -SIGTERM %i" to shutdown the web2py server' % os.getpid()

To line 889 just after checking options.extcron we also have the process id
for the GUI application:
# ## if -C start cron run (extcron) and exit
    # ## if -N or not cron disable cron in this *process*
    # ## if --softcron use softcron
    # ## use hardcron in all other cases
    if options.extcron:
        print 'Starting extcron...'
        global_settings.web2py_crontype = 'external'
        extcron = newcron.extcron(options.folder)
        extcron.start()
        extcron.join()
        return
    elif cron and not options.nocron and options.softcron:
        print 'Using softcron (but this is not very efficient)'
        global_settings.web2py_crontype = 'soft'
    elif cron and not options.nocron:
        print 'Starting hardcron...'
        global_settings.web2py_crontype = 'hard'
        newcron.hardcron(options.folder).start()

    print 'use "kill -SIGTERM %i" to shutdown the web2py server' %
os.getpid()

Then you can remove the line from here:
if not options.nobanner:
        print 'please visit:'
        print '\thttp://%s:%s' % (ip, port)
        print 'use "kill -SIGTERM %i" to shutdown the web2py server' %
os.getpid()

The output will become:
(bossteam_dev)bruce@dev101:~/Development/bossteam_dev/projects/yaw_dev$
python web2py.py
web2py Web Framework
Created by Massimo Di Pierro, Copyright 2007-2011
Version 1.99.4 (2011-12-14 14:46:14) stable
Database drivers available: SQLite3, pymysql, PostgreSQL
Starting hardcron...
use "kill -SIGTERM 5680" to shutdown the web2py server
please visit:
http://127.0.0.1:8000
starting browser...


-- 
-- 
Regards,
Bruce Wade
http://ca.linkedin.com/in/brucelwade
http://www.wadecybertech.com
http://www.warplydesigned.com
http://www.fitnessfriendsfinder.com

Reply via email to