Skip to main content
Post Locked by Dennis
Notice added Historical significance by Dennis
Post Closed as "Needs more focus" by Dennis
add underhanded tag, other minor fixes
Source Link

I'm searching (am I?) for a piece of code that quits immediately - in an absolutely unconventional way.

This meansdoes not mean: System.exit((int) 'A'); //java (Java).

It might mean: (python)

#!/usr/bin/python3 # unix only, might work onenv windowspython3 # noteNOTE: This kills ALL RUNNING pythonPython processes. Be careful /!\ def exit(): import os os.system("killall python3") # Windows addon os.system("taskkill /im python.exe /f") # or whatever filename python@windows has exit() 

Most upvoted answer wins! All languages, all architectures.

EDIT:Edit: Quitting by throwing exceptions won't be accepted any more!

I'm searching (am I?) for a piece of code that quits immediately - in an absolutely unconventional way.

This means not: System.exit((int) 'A'); //java

It might mean: (python)

#!/bin/python3 # unix only, might work on windows # note: kills ALL RUNNING python processes. Be careful /!\ def exit(): import os os.system("killall python3") # Windows addon os.system("taskkill /im python.exe /f") # or whatever filename python@windows has exit() 

Most upvoted answer wins! All languages, all architectures

EDIT: Quitting by throwing exceptions won't be accepted any more!

I'm searching (am I?) for a piece of code that quits immediately - in an absolutely unconventional way.

This does not mean: System.exit((int) 'A'); (Java).

It might mean:

#!/usr/bin/env python3 # NOTE: This kills ALL RUNNING Python processes. Be careful! def exit(): import os os.system("killall python3") # Windows addon os.system("taskkill /im python.exe /f") exit() 

Most upvoted answer wins! All languages, all architectures.

Edit: Quitting by throwing exceptions won't be accepted any more!

edited tags
Link
Justin
  • 21.4k
  • 9
  • 68
  • 117
Tweeted twitter.com/#!/StackCodeGolf/status/417560439669919744
Removed code-trolling disclaimer, because this isn't a code-trolling question
Source Link
user3094403
  • 8.4k
  • 7
  • 46
  • 71

I'm searching (am I?) for a piece of code that quits immediately - in an absolutely unconventional way.

This means not: System.exit((int) 'A'); //java

It might mean: (python)

#!/bin/python3 # unix only, might work on windows # note: kills ALL RUNNING python processes. Be careful /!\ def exit(): import os os.system("killall python3") # Windows addon os.system("taskkill /im python.exe /f") # or whatever filename python@windows has exit() 

Most upvoted answer wins! All languages, all architectures

EDIT: Quitting by throwing exceptions won't be accepted any more!

Note: This is a question. Please do not take the question and/or answers seriously. More information here.

I'm searching (am I?) for a piece of code that quits immediately - in an absolutely unconventional way.

This means not: System.exit((int) 'A'); //java

It might mean: (python)

#!/bin/python3 # unix only, might work on windows # note: kills ALL RUNNING python processes. Be careful /!\ def exit(): import os os.system("killall python3") # Windows addon os.system("taskkill /im python.exe /f") # or whatever filename python@windows has exit() 

Most upvoted answer wins! All languages, all architectures

EDIT: Quitting by throwing exceptions won't be accepted any more!

Note: This is a question. Please do not take the question and/or answers seriously. More information here.

I'm searching (am I?) for a piece of code that quits immediately - in an absolutely unconventional way.

This means not: System.exit((int) 'A'); //java

It might mean: (python)

#!/bin/python3 # unix only, might work on windows # note: kills ALL RUNNING python processes. Be careful /!\ def exit(): import os os.system("killall python3") # Windows addon os.system("taskkill /im python.exe /f") # or whatever filename python@windows has exit() 

Most upvoted answer wins! All languages, all architectures

EDIT: Quitting by throwing exceptions won't be accepted any more!

added 222 characters in body
Source Link
s3lph
  • 1.6k
  • 2
  • 12
  • 17
Loading
removed tag code-trolling
Link
Justin
  • 21.4k
  • 9
  • 68
  • 117
Loading
added 64 characters in body
Source Link
s3lph
  • 1.6k
  • 2
  • 12
  • 17
Loading
added 69 characters in body
Source Link
s3lph
  • 1.6k
  • 2
  • 12
  • 17
Loading
Source Link
s3lph
  • 1.6k
  • 2
  • 12
  • 17
Loading