Questions tagged [abort]

This tag refers to the action of terminating (stopping) a process before it has finished naturally. Usually, this is done because a fatal error was encountered during operation.

Use this tag for any questions related to aborting a process.

660 questions
164
votes
13 answers

How do I abort/cancel TPL Tasks?

In a thread, I create some System.Threading.Task and start each task. When I do a .Abort() to kill the thread, the tasks are not aborted. How can I transmit the .Abort() to my tasks ?
Patrice Pezillier
  • 4,476
  • 9
  • 40
  • 50
150
votes
5 answers

What is the difference between exit() and abort()?

In C and C++, what is the difference between exit() and abort()? I am trying to end my program after an error (not an exception).
Nathan Stoddard
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
106
votes
4 answers

Stop execution of Ruby script

Is there a method like exit or die in PHP which stops the execution of a Ruby script?
adaxa
  • 1,580
  • 2
  • 14
  • 17
101
votes
10 answers

How to programmatically cause a core dump in C/C++

I would like to force a core dump at a specific location in my C++ application. I know I can do it by doing something like: int * crash = NULL; *crash = 1; But I would like to know if there is a cleaner way? I am using Linux by the way.
hhafez
  • 38,949
  • 39
  • 113
  • 143
98
votes
1 answer

How to Abort Git Bisect

I started my git bisect by specifying good and bad revisions but I don't think they registered. Additionally, as I am attempting to specify git bisect good and bad, I don't think git is doing anything. I would like to abort the entire bisect so that…
Stunner
  • 12,025
  • 12
  • 86
  • 145
92
votes
17 answers

Xcode 8 cocoapods abort trap: 6

localhost:PodTest3 haiwang$ pod install Analyzing dependencies Downloading dependencies Installing MBProgressHUD (0.9.2) Installing Masonry (1.0.2) Generating Pods project Abort trap: 6 After upgrading to Xcode 8, cocoapods doesn't work anymore. I…
haiwang
  • 915
  • 1
  • 6
  • 6
37
votes
8 answers

Response.Redirect results in "Object moved to here"

I'm working on a C# ASP.NET page that normally ends up redirecting to a "file:" URL. This seems to work fine the majority of the time, in the majority of circumstances, but occasionally (and, on my test system, apparently always) instead of a…
gkrogers
  • 8,126
  • 3
  • 29
  • 36
35
votes
4 answers

Flask - How to create custom abort() code?

Flask has a good error handler by using abort() or when the error truly occurred. From Flask documentation there is an example for error 404 handler: @app.errorhandler(404) def not_found(error): return render_template('404.html'), 404 So, I…
hrsetyono
  • 4,474
  • 13
  • 46
  • 80
33
votes
2 answers

Standard 401 response when using HTTP auth in flask

In flask, I'm using the following snippet to enable HTTP auth: def authenticate(): return Response('', 401, {'WWW-Authenticate':'Basic realm="Login Required"'}) Now, in my past experience with Flask, if…
ingh.am
  • 25,981
  • 43
  • 130
  • 177
30
votes
7 answers

Browser waits for ajax call to complete even after abort has been called (jQuery)

I have some (potentially) long-running ajax calls that I would like to abort if the user navigates to another page. The following jQuery code calls abort on all pending XMLHttpRequest objects upon navigating away from the page: $.ajaxSetup({ …
Todd Menier
  • 37,557
  • 17
  • 150
  • 173
30
votes
9 answers

Is C#'s using statement abort-safe?

I've just finished reading "C# 4.0 in a Nutshell" (O'Reilly) and I think it's a great book for a programmer willing to switch to C#, but it left me wondering. My problem is the definition of using statement. According to the book (p. 138), using…
Dzinx
  • 55,586
  • 10
  • 60
  • 78
29
votes
3 answers

How can I start another request after AbortController.abort()?

I've read about cancelling fetch requests by using AbortController.abort(). Is there a way to start a request again without aborting it after calling this command? For example, in this demo from MDN, once Cancel download has been clicked, clicking…
jenwoodson
  • 373
  • 4
  • 9
28
votes
9 answers

C++: How to implement a timeout for an arbitrary function call?

I need to call a library function that sometimes won't terminate within a given time, unfortunately. Is there a way to call the function but abort it if it doesn't terminate within n seconds? I cannot modify the function, so I cannot put the abort…
Frank
  • 64,140
  • 93
  • 237
  • 324
28
votes
5 answers

How to check if connection was aborted in node.js server

I'm making some long polling with node.js. Basically, node.js server accepts request from the user and then checks for some updates. If there're no updates, it will check them after the timeout. But what if user has closed his tab, or went to…
AbstractVoid
  • 3,583
  • 2
  • 39
  • 39
1
2 3
43 44