Code

Opened 3 years ago

Closed 3 years ago

#15159 closed (wontfix)

createsuperuser can't be interrupted or suspended

Reported by: slinkp Owned by: nobody
Component: Core (Management commands) Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

To reproduce:

  • django-admin.py createsuperuser
  • enter an email address
  • at the password prompt, change your mind and hit Ctrl-C
  • that doesn't work, try Ctrl-Z
  • that doesn't work either, you just keep getting prompted

Workaround is to kill from another terminal or ssh session.

Attachments (0)

Change History (5)

comment:1 Changed 3 years ago by sontek

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

You can use Ctrl+d to interrupt this prompt. Ctrl+d sends EOF. This is the only way to interrupt it since the special way getpass has to modify the terminal to disable echo. This isn't a bug.

comment:2 Changed 3 years ago by russellm

  • Triage Stage changed from Unreviewed to Accepted

It's is a bug; a command line tools should obey SIGINT.

comment:3 Changed 3 years ago by mmcnickle

If it's a bug, it's an upstream python bug. The python UNIX implementation of getpass() seems to actively suppress SIGINTs http://svn.python.org/view/python/trunk/Lib/getpass.py?revision=76000&view=markup#l65 though the windows implementation seems to allow it http://svn.python.org/view/python/trunk/Lib/getpass.py?revision=76000&view=markup#l101

comment:4 Changed 3 years ago by mmcnickle

There is a very recent upstream bug report for this: http://bugs.python.org/issue11236

comment:5 Changed 3 years ago by russellm

  • Resolution set to wontfix
  • Status changed from new to closed

Given that this is an upstream bug, and fixing it will be a non-trivial task, I'm going to mark this wontfix.

Of course, if someone finds a trivial workaround, feel free to reopen and provide that patch.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.