Questions tagged [kill]
Kill is an operation of removing an object or process from memory so that other processes/variables can use them.
1,583
questions
0
votes
1
answer
31
views
Kill process running on a port in node.js
I am trying to start a process on port 3000 and 3080 in a node.js app. I want to check if these ports are already running processes and want to kill those processes.
I tried portscanner but no luck.
...
3
votes
1
answer
74
views
Is it okay to parallelize memory allocation delete with openmp? (c++)
int **something = new int *[N];
for(int n = 0; n < N; n++)
something[n] = new int[M];
#pragma omp parallel for
for (int n = 0; n < N; n++)
delete[] something[n];
delete[] something;
...
0
votes
0
answers
11
views
(Windows) Ctrl+C not working in terminal app
I'm currently writing a Snake in C++/ncurses, and my Ctrl+C has suddenly stopped working when inside the game. The fun thing, tho, is it still works outside of it (so when I'm just in the terminal) ...
0
votes
0
answers
43
views
How to identify different type of exit 'shutdown', 'restart', 'kill', 'kill -x' in python?
Is it possible to identify in the python application type of external exit/break? I would like to do different actions (release sources slow & correct/complex or fast & partly/dirty) based on ...
1
vote
1
answer
56
views
Interrupt and, if necessary, terminate a program at regular intervals in c++
I need your help. Program A executes program B with fork(). Every 5 seconds the process belonging to program B is interrupted. If the user enters any key within a certain time, the process is ...
1
vote
0
answers
51
views
How to disable Laravel DB reconnect?
Our analitic system which works with huge DB. Some of queries can take few hours.
We create DB query and after 60 seconds if it is not done we kill it and add this query as Job to Queue.
Now we ...
2
votes
1
answer
46
views
How can I stop an active query on a postgres coordinator when the worker node has crashed
I have a postgres select query that can not be stopped using the standard pg_cancel/pg_terminate commands.
Both commands return true, but do nothing.
The query has access share locks on hundreds of ...
0
votes
0
answers
69
views
Getting a Process ID & Assigned to a variable and kill the process in Bash Script
I store in a variable an executed command like so:
pio device monitor -p COM22 -b 115200 --no-reconnect | grep -E -o -m 1 '[A-Za-z0-9]{12}'
pio device monitor is a command to watch custom logs from an ...
0
votes
0
answers
20
views
How to use "kill -STOP" in shell script?
I want to use "kill -STOP" in a script to wait for the process to end
I wrote this script, but "kill -STOP" command doesn't pause the process
#!/bin/bash
echo $$ > ~/...
1
vote
0
answers
43
views
Bash if kill hangs then kill -9
I am trying to write a bash function that tries to kill pids. If the kill hangs for x time then kill -9 pids;
kill_service() {
service="$1"
pids="$(ps -s "$(ps -ef | awk '/...
0
votes
1
answer
47
views
Set up emacs server so that it dies when the last frame is closed
I have run into issues using the emacs server started when I log in and emacsclient. Specifically, I use the same emacs server for different R projects things get ugly and commands from different ...
0
votes
1
answer
32
views
PowerShell, Start an app hidden in background, then kill that app
An app I want to push to various systems (Notepad++) doesn't generate it's configuration file until after it starts, so I'd like to start the application quickly hidden in the background so that the ...
0
votes
1
answer
181
views
How I can disable daemons / services (that run and that I can't kill) in Mac OS X
I want to kill a process on MacOS but after kill -9 PID it starts immediately.
0
votes
0
answers
44
views
PowerShell, How to stop a specific script that is running?
I have a script running in AutoHotkey called BasicTools.ahk; it is process that runs under autohotkey.exe. When I run Get-Process it only shows me instances of Autohotkey so I have no way to isolate ...
0
votes
0
answers
37
views
How to kill a process in C? [duplicate]
I'm currently trying to display a picture each time the user makes an input.
But I wanna close the previous picture and I struggle doing it in C.
What I'm doing looks like this :
#include <stdio.h&...
0
votes
0
answers
31
views
Killing a calling script within a called script
Hey Guys I have a question regarding killing a called script in some exceptions/errors, and killing the entire calling script in other exceptions/errors:
I have a Calling script, Main.py, which calls ...
2
votes
1
answer
133
views
How can I resume a stopped process?
Following this documentation, I am testing how to stop and resume a process. I have basic code to test as follows:
#include <iostream>
#include <csignal>
#include <unistd.h>
int ...
1
vote
1
answer
87
views
Android Dialog dialog (activity context) not dismissed when activity is killed in background
This one is fairly simple, so I hope I get an answer
I have an Activity which displays dialogs using both fragments (dismiss is easy to handle in fragment) and the classic Dialog dialog (Context c) ...
0
votes
0
answers
15
views
Taskkill doesn't work - is there a changed way to do this in VS 2022 pre-build
I've been using:
taskkill /f /fi "imagename eq $(TargetFileName)"
.. in the pre-build events to kill the running program upon rebuilding. Now, however, it doesn't seem to work that simple ...
0
votes
0
answers
11
views
OLEDB lastwaittype openrowset timeout
I am using openrowset in ETL for insert data to temp table. But I got some of error in SSIS (don´t have log to debug the issue) and package is failed but session/transaction and oledb is still "...
1
vote
2
answers
87
views
What is alternative to "lock_timeout" in PostgreSQL?
I need to kill my session, if I'm blocking other sessions.But as of now we have only option to kill own session blocked by other sessions using lock_timeout.
Do we have option in postgres to timeout ...
0
votes
0
answers
28
views
how to kill process state rollback in mysql
Please help
I want to kill the process id whose state is rollback, but the process can't be killed, and causes the table to lock
1
vote
0
answers
44
views
Deleting File with Kill not always working
I am a newbie working on my first VBA project. The application processes orders and collects info that needs to be printed on labels that go on packages. The company that prints our labels will take ...
0
votes
0
answers
80
views
How to destroy resource in driver module when SIGKILL signal?
I know some user space resources (e.g. fd/socket) used by a process will be destroyed automatically by kernel when "kill -9". But I am still confused about how driver (in kernel space) ...
1
vote
1
answer
446
views
exit-status: -1 when kill process through jenkins
I have used Jenkins for build and deploy my artifacts to server. After deploying files I stopped service by using kill command
kill -9 'pgrep -f service name'
note that the service killed but jenkins ...
0
votes
0
answers
150
views
How to check the Kill/Dead state for android app in React Native?
In React Native. How can I get the killed or dead state of the app.?
React native's Appstate & many other library can provide the active, foreground, & background state(till when the app is ...
0
votes
0
answers
26
views
fork, execlp, kill and waitpid with fbi but still ending up with zombies
I'm running Pi OS Bullseye on a Pi4 and I'm trying to do the following:
Run a systemd service
Have that service display images (child process C1 exec fbi)
On demand, display next images (child ...
0
votes
1
answer
454
views
How to run an npm script with a timeout (kill process if it takes longer then certain amount of time)?
I have an npm build script for Angular:
"build": "ng build my-project-name"
This script often hangs (inside our build pipeline and locally). I'd like to set a timelimit after ...
3
votes
0
answers
143
views
Swoole sending check_worker_exit_status() log
I have a problem while using laravel with swoole on php 8.1.Some requests finished with HTTP 408 sometimes. Then when I looked at the log file, I saw the following error.
[2022-07-29 08:59:52 $28.0] ...
0
votes
0
answers
43
views
Screen recording interrupted
I'm screen recording MP4 videos (with audio) while app is on background but whenever I have heavy memory usage (usually file system) Android kills my app or purge memory cache, leading to a "soft ...
0
votes
0
answers
33
views
Stop a running script in python3 from another script
I have 2 scripts - one is running and when I press a button, a second script is launched.
That is working; but I would like to kill that second script when I release the button again.
The killing of ...
0
votes
1
answer
105
views
Kill a server listening on specific port
i am executing this php file to stop my server from listening mode
command: echo exec('npx kill-port 9005');
it display this message on screen: Process on port 9005 killed
but when i open xampp port ...
3
votes
0
answers
540
views
Error: listen EADDRINUSE: address already in use :::8000
so i have been working on a node backend project for a while now and suddnely i started encountering this error with my nodemon crashing everytime it tries to restart the app.
The common fix for this ...
1
vote
2
answers
176
views
How to safely close another application that has an exit popup without using process.Kill()
I have an application that I would like to close from my current C# application. The problem is that the application I want to close has an exit confirmation that requires the user to confirm the ...
0
votes
0
answers
46
views
How can I avoid killing my code on Linux?
I'm trying to run my code which is supposed to calculate molecular descriptors, but it gets killed by an Out-of-memory error, even though (I think?) I have enough memory to process it. How can I edit ...
0
votes
1
answer
460
views
How to display images, close and display next image
I want to create a training program for American Sign Language fingerspelling. I have a library of images for each letter of the alphabet and would like to have the script read through a text file ...
-1
votes
1
answer
270
views
how to kill all process of aws unsing linux command?
my EC2 system has got 100 % CPU utilization.So I need to find which commands are running in the background. So that I can kill all the running services of AWS. What is the Linux command for this?
0
votes
1
answer
34
views
Recursive SIGSTOP
I can send a STOP signal to a pid using:
kill -STOP PID
And then resume it:
kill -CONT PID
How do I recursively send this to all the children of the pid in the tree as well?z
0
votes
0
answers
45
views
main process --> pthread --> fork --> lets the forked process run and kill main
Process A should start process B and then terminate. Process B should continue as an independent process
please have a little mercy on me - i am trying to educate myself and i like to learn more
int ...
0
votes
0
answers
43
views
Stop or kill a daemon to stop hanging requests.get
I have a project using multiple threads to check the status code from a url list. At some point the project hangs using request
response = requests.get(url, timeout=(10, 5))
...
print(response....
0
votes
1
answer
1k
views
Kill command does the job but gives error
I'm using shell script to stop a python service and to do that I'm executing the below command.
ps -ef | grep service.py | grep -v grep | awk '{print $2}' | xargs kill -9
After executing I'm getting ...
0
votes
0
answers
323
views
Unable to close nginx process using windows star and stop/quit commands
First point, I am unable to get the following working right for nginx.
function execCommand(exe, args, cmdOptions, dataHandler) {
let ex = require('child_process').exec;
return ex([exe, ......
2
votes
1
answer
184
views
Port In Use code: 'EADDRINUSE', even after kill command
I have been running several MERN activities, one after another, working through exercises, but at some point when I run npm run develop, even thought I hit the kill command (trash icon) on mac, it ...
0
votes
0
answers
66
views
C# : Killing a specific file opened and not all instance
I'm trying to open an excel file in my application via Process.
When the form is closed I want to close that file automatically .
The issue that I'm facing is even if I specify the PID process of the ...
0
votes
2
answers
35
views
Need to parallel run a video on multiple hosts BASH
So I have a for loop where
for HOST in $HOST_LOOP
do
ssh $HOST ... play video ... &
done
wait
I wanted to play the video on those hosts at the same time, that's what the & is ...
0
votes
1
answer
170
views
waiting once after sending kill signal to multiple processes?
So I'm working on a project for one of my programming classes, and part of this assignment is about being able to launch process in the background, and being able to kill them when the user types &...
-1
votes
1
answer
225
views
i want to kill my sprite. how to kill it?
import pygame as pygame , sys,time
pygame.init()
size = (700,500)
window_game = pygame.display.set_mode(size)
_run_ = True
white = (255,255,255)
...
0
votes
1
answer
1k
views
Linux short simple command how to send SIGTERM to a process and SIGKILL if it fails to exist in X seconds?
How should look the Linux command to send terminate signal to the process/PID and if it fails to exit gracefully after 10 seconds kill it?
My attempt is: "sudo timeout -vk 5 10 kill PIDhere" ...
0
votes
0
answers
99
views
DBSCAN running out of memory and getting killed
I am passing data normalized using MinMaxScaler to DBSCAN's fit_predict. My data is very small (12 MB, around 180,000 rows and 9 columns). However while running this, the memory usage quickly climbs ...
0
votes
1
answer
455
views
subprocess.Popen is creating two processes instead of one
I am creating a subprocess using this line of code:
p = subprocess.Popen(["doesItemExist.exe", id], shell=False)
and when I run the script while I have the Task Manager open, I can see that ...