# Abort (computing)

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Abort_(computing)
> Markdown URL: https://mediated.wiki/source/Abort_(computing).md
> Source: https://en.wikipedia.org/wiki/Abort_(computing)
> Source revision: 1351011591
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

{{short description|Unscheduled termination of a process}}
{{more citations needed|date=January 2021}}
{{Wiktionary|abort}}
{{dictionary definition|date=February 2023}}
In a [computer](/source/computer) or [data transmission](/source/data_transmission) system, to '''abort''' means to [terminate](/source/Wiktionary%3Aterminate), usually in a controlled manner, a processing activity because it is impossible or undesirable for the activity to proceed or in conjunction with an error.  Such an action may be accompanied by [diagnostic](/source/Wiktionary%3Adiagnostics) information on the aborted process.<ref>{{Cite web|url=https://www.computerhope.com/jargon/a/abort.htm|title=What is Abort?|website=www.computerhope.com|language=en|access-date=2019-04-22|archive-date=2019-04-22|archive-url=https://web.archive.org/web/20190422210450/https://www.computerhope.com/jargon/a/abort.htm|url-status=live}}</ref>

In addition to being a verb, abort also has two noun senses.  In the most general case, the event of aborting can be referred to as an abort.  Sometimes the event of aborting can be given a special name, as in the case of an abort involving a [Unix](/source/Unix) [kernel](/source/Kernel_(operating_system)) where it is known as a [kernel panic](/source/kernel_panic).  Specifically in the context of [data transmission](/source/data_transmission), an abort is a function invoked by a sending station to cause the recipient to discard or ignore all [bit](/source/bit) sequences transmitted by the [sender](/source/Sender_(telephony)) since the preceding [flag sequence](/source/flag_sequence).

In the [C programming language](/source/C_(programming_language)), [<code>abort()</code>](/source/C_process_control) is a standard library function that terminates the current application and returns an error code to the host environment.<ref name=":0">{{Cite web|url=http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf|title=C11 standard (ISO/IEC 9899:2011)|access-date=2020-03-11|archive-date=2018-03-29|archive-url=https://web.archive.org/web/20180329042731/http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf|url-status=live}}</ref>

== Types of aborts ==

# '''User-Initiated Aborts''': Users can often abort tasks using keyboard shortcuts (like Ctrl + C in terminal applications) or commands to terminate processes. This is especially useful for stopping unresponsive programs or those taking longer than expected to execute.<ref name=":1">{{Cite web |date=24 May 2021 |title=What is Abort? {{!}} Webopedia |url=https://www.webopedia.org/definitions/abort/ |access-date=3 November 2024 |website=nojs-rotate.domaincntrol.com}}</ref>
# '''Programmatic Aborts''': Developers can implement abort logic in their code. For instance, when a program encounters an error or invalid input, it may call functions like <code>abort()</code> in C or [C++](/source/C%2B%2B) to terminate execution. This approach helps prevent further errors or potential data corruption.<ref name=":0" /><ref name=":2">{{Cite web |date=2010-07-09 |title=C exit(), abort() and assert() Functions |url=https://www.geeksforgeeks.org/c-exit-abort-and-assert-functions/ |access-date=2024-11-03 |website=GeeksforGeeks |language=en-US}}</ref>
# '''System-Level Aborts''': Operating systems might automatically abort processes under certain conditions, such as resource exhaustion or unresponsiveness. For example, a watchdog timer can terminate a process that remains idle beyond a specified time limit.<ref name=":1" /><ref name=":2" />
# '''Database Transactions''': In database management, aborting (often termed ‘rolling back’) a transaction is crucial for maintaining data integrity. If a transaction cannot be completed successfully, aborting it returns the database to its previous state, which ensures that incomplete transactions don't leave the data inconsistent.<ref name=":2" />

Aborts are typically logged, especially in critical systems, to facilitate troubleshooting and improve future runs.<ref name=":2" />

==See also==
* [Abort, Retry, Fail?](/source/Abort%2C_Retry%2C_Fail%3F)
* [Abnormal end](/source/Abnormal_end)
* [Crash](/source/Crash_(computing))
* [Hang](/source/Hang_(computing))
* [Reset](/source/Reset_(computing))
* [Reboot](/source/Reboot_(computing))

==References==
{{Reflist}}

Category:Computing terminology

{{compu-stub}}

---
Adapted from the Wikipedia article [Abort (computing)](https://en.wikipedia.org/wiki/Abort_(computing)) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Abort_(computing)?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
