2,824 questions
1
vote
1
answer
231
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
86
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
182
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
159
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
255
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
0
answers
22
views
SFML window not rendering – exit code -1073741515 (0xC0000135) [duplicate]
I'm trying to just render a window using auto window = RenderWindow(); from SFML but the compiler shows exit code -1073741515 (0xC0000135) over and over again. What causes this specific exit code?
I'm ...
0
votes
1
answer
74
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
185
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
74
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
81
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
56
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
70
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
57
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
122
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....
1
vote
1
answer
122
views
How to make a shared library's global object survive exit() function?
I have a problem with a shared library's global object getting destroyed before it is used. I do not know all details nor do I have control over an application that uses the library but my assumption ...
1
vote
1
answer
77
views
Why does exit() in a "with open..." block cause 31 to be printed on Terminal?
I'm trying to track down an error about exiting while a file is open. In doing so, I interactively (not in an IDE, just into Terminal after running Python) entered the following code snippet to ...
1
vote
2
answers
67
views
shell exit function for set -e
I have a script.command file with a shell script inside, so that I can double click it to execute in a new terminal window. When it finishes the script it automatically closes regardless of the exit ...
1
vote
0
answers
138
views
How to fork Qt6 program
I have already exhaustively googled this topic, and the answer is "don't do it".
However I am kind of stuck between a rock and a hard place, so I need to thoroughly explore this topic before ...
2
votes
0
answers
569
views
Python error "RuntimeError: cannot schedule new futures after shutdown"
I am running a python (v3.9.16) application from a main thread while a separate worker thread runs an asyncio loop that makes SQL queries to a database (using aioodbc v0.5.0).
The main thread ...
1
vote
2
answers
132
views
What variables are destroyed when calling exit(), based on Microsoft's docs?
I was trying to figure out the differences between terminate(), exit() and abort(), and Microsoft's
C++ program termination documentation came up in my Google search that compares exit vs abort vs ...
2
votes
0
answers
121
views
Stop execution of a python script as if it ran to the end
I want to stop the execution of a Python (3.12) script with a behaviour that is identical to the script running to completion in ideally all contexts, such as:
run with python script.py;
run with ...
0
votes
0
answers
39
views
win32com Excel terminating python program out of nowhere
I'm using a library called Excel2Image in order to take a sheet range in excel and save it as a video. This library uses win32com in order to get an excel application.
Inside of my main program, ...
0
votes
1
answer
127
views
How do I Exit a Process if a Child Fails?
The program I'm working with requires a secondary executable to run (for asset compression). For error handling reasons, I need the return value of the child process. According to the system man page,
...
0
votes
1
answer
535
views
Get this error statement: Process 'command 'C:\src\flutter\flutter\bin\flutter.bat'' finished with non-zero exit value 1
Whenever I try to run an app, I get the error code below. There is absolutely no solution for this online, and it is getting really frustrating.
FAILURE: Build failed with an exception.
Where:
Script '...
0
votes
1
answer
36
views
I have no idea what error I am going through.. Can anyone explain how to fix this problem?
enter image description here
The sign error. I have no idea what error I am going through.
I have tried it for several times, even reinstalled visual studio for Mac twice. But the problem wasn't ...
0
votes
1
answer
136
views
Powershell to continue gracefully in case of a try catch
Appologies, this might be a simple thing, but I can't get it working!! I have a much bigger script for the demo purposes I have simplified this. Basically, what I want is that PowerShell to continue ...
0
votes
1
answer
41
views
Python program stuck or quit without warning or error (sometimes raise segment fault)
Code:
import subprocess
from PIL import Image
import colorsys
import numpy as np
for t in range(1,49):
in_file_name=f"Pf{t:02d}.bin"
subprocess.run(f"sz3 -f -i /home/jzz/...
0
votes
1
answer
197
views
In C# how to exit the PowerShell execution using the Exit command
my C# code invokes PowerShell scripts to do somthing. However after the script is executed there is always a "powershell.exe" process existing on the system's Task Manager list. I want to ...
1
vote
1
answer
199
views
How do I close all applications before quitting awesomewm?
I'd like to write a function that closes all open applications before quitting.
This is to make sure I haven't forgotten to save a modified file.
If I use the Super+Shift+q shortcut, awesome forces ...
-1
votes
2
answers
140
views
Simple C++ Program. Need Clarification On "Bad Coding Practice" [closed]
This program's purpose is basically to get a character from a user and repeat it. There were a few things we had to do other than that in the program but that was the gist of it.
#include <iostream&...
1
vote
0
answers
62
views
How to close an express and a websocket server on the git bash terminal close on Windows
I want my node.js app close on git bash terminal window close ( without pressing ctrl+c )
I tried SIGTERM SIGINT SIGHUP SIGWHATEVER, it doesn't work, the app won't exit, I get 'the port blabla is ...
1
vote
0
answers
231
views
Problems with docker nodejs app exit code 137
I'm trying to develop a full-stack app with nodejs, react-native, expo and docker and when I try to make docker-compose down or docker-compose stop I get as status Exited(137) in frontend and backend ...
1
vote
0
answers
61
views
Why does this Python script hang? async-await? Django-ORM?
I'm trying to learn to use this Python package for patent searching:
https://pypi.org/project/patent-client/
https://patent-client.readthedocs.io/en/latest
I'm following this example:
https://patent-...
0
votes
1
answer
40
views
Exiting a timer macro before calling it again
I have an excel countdown macro that works fine, but I need to be able to exit the routine if it's called a second time before the first version runs to zero... right now, when the user creates a ...
1
vote
1
answer
65
views
exit() status does not act accordingly
So I have a program that calls execvp() as seen below
void ext_com(char* buffer){
char **command;
pid_t child_pid;
command = get_input(buffer);
child_pid = fork();
if(child_pid<...
-1
votes
1
answer
124
views
C++ exit(1) causes IO loss?
Here is my program:
#include <fstream>
int main() {
std::ofstream fout("data.dat", std::ios::binary);
for (int isam=0; isam<500; isam++) fout.write((char*) &isam, 4);
...
1
vote
1
answer
308
views
I tried to do exit the app on second tap using Popscope but it didn't work on the way I expected, It didn't even exit
late int selectedIndex;
DateTime? currentPress;
Widget build(BuildContext context) {
return PopScope(
canPop: false,
onPopInvoked: (didPop) async {
if(selectedIndex != 0){
...
0
votes
1
answer
152
views
Are you allowed to have fork as a for condition?
this question was on last year's exam and i have never seen anything like this in my life. I know what fork does, what it returns, but this... i can't even compile this
what is displayed when running ...
0
votes
1
answer
193
views
framer motion exist transition is not working
import { motion, AnimatePresence } from 'framer-motion';
<AnimatePresence>
{isOpen && (
<motion.div
key="modal"
ref={sheetRef}
initial={{ y: '100%' }}
...
1
vote
1
answer
50
views
Why does getattr() exit a program when it raises an exception inside a try statement?
I have a file called table_builders.py where I have defined multiple classes. Inside another script, I am importing them in a loop. The classes that I am trying to import are listed in builders_list.
...
1
vote
1
answer
269
views
Why pressing Ctrl + C to interrupt a node js server application doesn't close previous opened ports?
I have an express server on localhost:3000. The problem is whenever I restart the server I get: EADDRINUSE. So the server will run on port 3001.
I have solved this problem by manually killing PID ...
1
vote
1
answer
323
views
How do I exit GNU APL?
"I am stuck and cannot escape." - jclancy
I've been using Dyalog workspaces to play with APL, but wanted to try it out on the CLI, so I downloaded GNU APL from homebrew to check it out. ...
0
votes
0
answers
29
views
Why doesn't an error stop a parallel python script [duplicate]
My intension is to raise an error and stop the Python script when certain condition met. Here is the relevant code snippet.
def my_func(some arguments):
# some code
if X.abs().max().max() > ...
0
votes
1
answer
166
views
How we can define Enter and Exit block to conenct the main flowchart in any logic?
enter image description here
How we can connect these two flowcharts together?
in order to complete the main flowchart we want to insert the flowchart which starts by Enter and finishes by Exit.
we ...
6
votes
3
answers
6k
views
Is there a standard set of exit code numbers for C/C++?
AFAIK, the exit code numbers may vary depending on the application and the conventions adopted in a project. However, I wonder if there is an exit code standard list for C/C++ projects.
2
votes
0
answers
200
views
How to force exit Django app when database connection fails
I am trying to have django asgi app exit when the database connection fails. Normal behaviour seems to be that the app and its endpoint happily keep running and are accessible even though the database ...
0
votes
1
answer
20
views
Exit as per Moving average Values
I have written the code below. its very basic.
I want the exit values (in live and backtesting) as per the moving average value on that particular bar.
//@version=4
strategy("My Strategy", ...
0
votes
1
answer
47
views
is there a way to exit a function when another one is called in wxpython?
I have two functions and when I call the second one after the first, the two functions run at the same time . I want to exit a function when another is running.
I call each function from a menuitem. I ...