2,822 questions
1
vote
1
answer
338
views
Why does the Python REPL behave differently in VS Code's vs native cmd.exe?
I am running the same python.exe, from the same working directory, in VS Code's terminal running cmd.exe, and in Windows Terminal running cmd.exe. For some reason, these two behave differently.
In ...
1
vote
1
answer
96
views
How to print (using view) and then exit with multiple workflows in nextflow?
I am debugging a workflow, and cannot quickly find a way to execute view (to print the diagnostic output) and then exit (quit) the workflow. The actual workflow is complex, and I reduced it to a ...
0
votes
1
answer
240
views
How to print (using view) and then exit in nextflow?
I am debugging a workflow, and cannot quickly find a way to execute view (to print the diagnostic output) and then exit (quit) the workflow.
If I use System.exit(0) or exit(0) in the code snippet ...
2
votes
1
answer
180
views
Perl DBI + DBD::Oracle crashes at exit on newer glibc versions
I'm encountering a crash at exit(0) in a simple Perl script using DBI with DBD::Oracle, specifically when running on newer versions of glibc.
Here’s a minimal script to reproduce the issue:
use DBI;
...
1
vote
1
answer
267
views
Perl script crashes with mremap_chunk(): invalid pointer or segmentation fault after exit 0
I'm running a Perl script where everything appears to execute correctly, but it crashes immediately after calling exit 0;.
Whether I run the script normally or with perl -d, the crash still happens.
...
0
votes
1
answer
79
views
How to quietly exit a runfile script?
I am using Spyder 6 console to invoke a Python script via the runfile command. After a recent Anaconda update, I found that sys.exit() no longer exits the script quietly. It prints:
An exception has ...
0
votes
0
answers
32
views
how to exit with non-zero and non-1 code in Go? [duplicate]
Using: go version go1.22.2 linux/amd64 on Ubuntu 24.04
some Go code:
svc.Rc = 0
fmt.Println("my rc="+strconv.Itoa(svc.Rc))
os.Exit(svc.Rc)
go run . ; echo $?
# my rc=0 <== correct as ...
2
votes
2
answers
238
views
Is there a way to run code if someone tries exiting the program?
I’m messing with PowerShell scripting and wanted to know if this was possible. I know when you use try / finally the code in the finally block will execute even when Ctrl+C is typed. However, how can ...
0
votes
0
answers
93
views
Exiting Pydroid3-scripts nicely
I'm having troules with Pydroid3: When a script is ending or an exception is thrown, Pydroid is halting and I have to force it to end by closing the app. Then anew opening the app, opening the script ...
3
votes
0
answers
84
views
How to Properly Exit Main Process from a Thread in C? [closed]
I am working on a C program that simulates a hair salon, and I'm facing an issue with terminating the main process from the simulation_timer_thread. The only way I can successfully exit the main ...
0
votes
1
answer
58
views
Exit() from background function fails in Python [duplicate]
I'm learnig python and doing some simple programming exercises (Python 3.13.2 and VScode 1.97.1)
Here, while a counter runs in the while loop, I'm listening for any key press in the background.
When &...
3
votes
1
answer
71
views
How to run on.exit if user aborts/interrupts the calculation?
Question: In R or RStudio, if a user aborts an ongoing calculation (by clicking the stop sign or pressing esc), on.exit is not called. Is there a way such that if the user presses esc, a certain ...
0
votes
1
answer
84
views
Calling functions on array make the program to exit
I want a Game of Life program in the console.
The parameters to initialize the 'field' can be changed in the mainMenu(). When all is done, it returns 1, and the drawing begins.
When we return from ...
0
votes
1
answer
63
views
cannot exit python with keyboard.add_hotkey
I am trying to add a hotkey to my python program so that I can quit out of it without having to click on the anaconda prompt and do ctrl+c.
From another topic I see that sys.exit() merely raises an ...
1
vote
1
answer
137
views
Why process.exit fails to stop execution of code
I currently have a file called shellScript.sh that has the following two lines
node firstJavascriptFile.js
node secondJavascriptFile.js
The contents of firstJavascriptFile.js are as follows:
console....