Questions tagged [quit]

156 questions
150
votes
6 answers

Correct way to quit a Qt program?

How should I quit a Qt Program, e.g when loading a data file, and discovered file corruption, and user need to quit this app or re-initiate data file? Should I: call exit(EXIT_FAILURE) call QApplication::quit() call QCoreApplication::quit() And…
daisy
  • 22,498
  • 29
  • 129
  • 265
131
votes
2 answers

How to abort an interactive rebase if --abort doesn't work?

I've got myself into a muddle via an interactive rebase, and I now wish to abort it. (i.e. go back to the point before I was dropped into interactive rebase mode, in my case via git pull --rebase.) The way to do this seems to be via git rebase…
mjs
  • 63,493
  • 27
  • 91
  • 122
84
votes
5 answers

openssl hangs and does not exit

I am trying to use openssl to get a certificate, and it seems to keep hanging. I have done a lot of research but not all of the available options seem to work on Windows. openssl s_client -showcerts -connect google.com:443 > cert.txt I have tried…
Adiboy
  • 843
  • 1
  • 6
  • 5
48
votes
5 answers

Is there a method that tells my program to quit?

For the "q" (quit) option in my program menu, I have the following code: elif choice == "q": print() That worked all right until I put it in an infinite loop, which kept printing blank lines. Is there a method that can quit the program? Else,…
Kudu
  • 6,570
  • 8
  • 27
  • 27
30
votes
5 answers

Prevent Emacs from exiting once the exit procedure has initiated?

Is there a way to prevent Emacs from exiting once I initiate the exit process? I occasionally fat finger C-xC-s as C-xC-c. It isn't an awful process to get back up and running but I am curious if there is a way I can stop the exit process so that I…
N Klosterman
  • 1,231
  • 14
  • 23
24
votes
2 answers

How to quit Python function, throwing error statement without quitting Python interpreter

I'm new to Python and struggling with handling self-defined errors. When my code spots the error, I want it to throw an error in red font and take me back to the Python terminal without killing Python. I came across sys.exit() looking for an answer,…
Gyan Veda
  • 6,309
  • 11
  • 41
  • 66
24
votes
3 answers

save variables after quitting application?

I want some variables to be saved, when I shut down my app and to load them after opening the app (for statistics in a game) How can I do this? EDIT: Here my code: TextView test1; String punkte = "15"; @Override public void onCreate(Bundle…
Stupe
  • 305
  • 1
  • 2
  • 11
21
votes
3 answers

What is the correct way to programmatically quit an MFC application?

Using windows MFC C++. I have a third party app that calls a user-defined method in my CWinApp derived class. This method is called after InitInstance(). If there is an error in this method, such that an exception is thrown and caught in a…
User
  • 62,498
  • 72
  • 186
  • 247
21
votes
6 answers

IOS Simulator cannot find sdk and the simulated application quit errors

I have been having this Xcode problem for a couple of months where my iOS simulator stops working whenever i run any application on Xcode and says, "The simulated application quit." and "iOS Simulator could not find the SDK. The SDK may need to be…
Matt Schaub
  • 231
  • 1
  • 2
  • 6
16
votes
2 answers

Difference between wq and x in vi

I always using :wq to save a file. Today, I came to know that :x can be used to do that. But I didn't notice it in any vi-tutorial or vi-quick-reference. Is there any difference between these two commands?
Mohammed H
  • 6,880
  • 16
  • 81
  • 127
13
votes
1 answer

Eclipse does not confirm exit when hitting command + q

I generally close tabs while using Eclipse with command+w, however, sometimes hit command+q by mistake. Even though I have Eclipse set-up to warn me when exiting (Preferences -> General -> Start-up and Shutdown, "Confirm exit when closing last…
arin
  • 1,774
  • 22
  • 35
9
votes
2 answers

Quit from pipe in bash

For following bash statement: tail -Fn0 /tmp/report | while [ 1 ]; do echo "pre"; exit; echo "past"; done I got "pre", but didn't quit to the bash prompt, then if I input something into /tmp/report, I could quit from this script and get into bash…
Qiu Yangfan
  • 871
  • 11
  • 25
9
votes
3 answers

How to properly quit a program in python

Im a middle school student, and im starting to learn coding in python. I have been watching video tutorials, but i cant seem to figure out how to make the game quit if you type q. here what i have.. print('How old do you thing Fred the Chicken…
user1766994
  • 91
  • 1
  • 1
  • 3
7
votes
1 answer

Qt app stays in memory even after MainWindow is closed

The problem is as follows: if the application is closed while it's not actively doing anything, it exits correctly. If it's actively working on something (waiting in a while loop, for example), however, the main window will close but the program…
SharpHawk
  • 378
  • 7
  • 19
7
votes
2 answers

No Application Quit event in Outlook?

I'm using the 12.0 Interop library, which is the default for Outlook 2007. I'm actually aiming for Outlook 2003 to 2010 integration with a code example that registers to a quit event. Even though the docs say that there is an application Quit event…
Alex
  • 7,432
  • 20
  • 75
  • 118
1
2 3
10 11