mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Fixed #4304 -- Modified sys.exit to os._exit to make sure development server quits when an error occurs attempting to bind to the requested port (e.g., if another server is already running). Thanks, Mario Gonzalez <gonzalemario@gmail.com>.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5738 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
		
							
								
								
									
										2
									
								
								AUTHORS
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								AUTHORS
									
									
									
									
									
								
							| @@ -117,7 +117,7 @@ answer newbie questions, and generally made Django that much better: | |||||||
|     glin@seznam.cz |     glin@seznam.cz | ||||||
|     martin.glueck@gmail.com |     martin.glueck@gmail.com | ||||||
|     GomoX <gomo@datafull.com> |     GomoX <gomo@datafull.com> | ||||||
|     Mario Gonzalez <gonzalemario @t gmail.com> |     Mario Gonzalez <gonzalemario@gmail.com> | ||||||
|     Simon Greenhill <dev@simon.net.nz> |     Simon Greenhill <dev@simon.net.nz> | ||||||
|     Owen Griffiths |     Owen Griffiths | ||||||
|     Espen Grindhaug <http://grindhaug.org/> |     Espen Grindhaug <http://grindhaug.org/> | ||||||
|   | |||||||
| @@ -1236,7 +1236,8 @@ def runserver(addr, port, use_reloader=True, admin_media_dir=''): | |||||||
|             except (AttributeError, KeyError): |             except (AttributeError, KeyError): | ||||||
|                 error_text = str(e) |                 error_text = str(e) | ||||||
|             sys.stderr.write(style.ERROR("Error: %s" % error_text) + '\n') |             sys.stderr.write(style.ERROR("Error: %s" % error_text) + '\n') | ||||||
|             sys.exit(1) |             # Need to use an OS exit because sys.exit doesn't work in a thread | ||||||
|  |             os._exit(1) | ||||||
|         except KeyboardInterrupt: |         except KeyboardInterrupt: | ||||||
|             sys.exit(0) |             sys.exit(0) | ||||||
|     if use_reloader: |     if use_reloader: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user