1,605 questions
1
vote
2
answers
66
views
How do I return the PID of an osascript call from within a function (or how do I create a persistent notification I can kill later in the script)?
I'm using Bash 3.2 in macOS Tahoe. I've hacked together this function to show an informational dialog:
showDialog(){
local strDialogText=$1
local intDialogSeconds=$2
IFS='' read -r -d '' strJS <&...
0
votes
0
answers
50
views
How to avoid stopping all processes that started by one systemd service when OOM happens?
In my env, some child processes are started by one systemd service, if there is something wrong with one child process and OOM is triggered by it, all the processes (all the child processes and the ...
1
vote
1
answer
98
views
Understanding behavior of DBus with respect to killing the process that used DBus to register a name
Take this simple program in Haskell
{-# LANGUAGE OverloadedStrings #-}
import Control.Exception (finally)
import Control.Monad (forever)
import Xmobar (tenthSeconds)
import DBus.Client
startServer' :...
1
vote
1
answer
70
views
Stored Procedure Efficiency Testing
I work with a BI software that generates dashboards for clients. We build charts for the clients by creating stored procedures under our own schema for rendering. Each stored procedure is a SQL query ...
0
votes
0
answers
70
views
Node process keeps respawning after killing
I have a node process that was originally started with the following command line:
nohup npm run serve-prod &
The process runs on port 5003 and I can see it listed with ps as follows:
ps -ef | ...
0
votes
0
answers
32
views
How to force kill MqttAsyncClient
I'm working on an Android app using Eclipse Paho's MqttAsyncClient (In Android) with SSL and multiple broker IPs. The idea is to that some nodes can be died and multiple IPs should improve system ...
1
vote
0
answers
133
views
xfce4-terminal cannot be killed
From a Python program, I start xfce4-terminal as a subprocess. When calling .terminate(), xfce4-terminal is still there. Not nice. So I tried to kill it more abruptly - surprisingly, the corresponding ...
3
votes
1
answer
153
views
How to unit-test a program using fork/exec with libcheck?
I'm trying to test a program, that forks and execs with libcheck (https://github.com/libcheck/check).
When I run the program normally it is able to create the subprocess waits a bit and then kills it ...
0
votes
0
answers
29
views
use os.kill(p.pid, signal.SIGTERM) make my main process not work
def __remove_progress_without_lock(self, k):
import os
import signal
if k in self.progress_map:
p = self.progress_map[k]
if p.is_alive():
# p.terminate()
...
0
votes
1
answer
61
views
Custom Threading Timer Kill Function Python
I have a queue with threading setup. I need it to kill the process if it runs longer than 2900s which works fine. I'm wanting to write out information if it has to kill the process because it ran to ...
0
votes
1
answer
72
views
Cannot kill Popen process [duplicate]
I have a Python program with the following structure and necessary imports:
def startLogger(logger_dir):
command0 = 'adb logcat -c'
command1 = 'adb logcat'
command2 = 'python3 '+logger_dir+...
0
votes
0
answers
72
views
killing a TCl/tk process cleanly in Windows
I'm having to kill a TCL/tk process in the task manager
and I want to do it within the batch file.
Here is the batch file that calls up the TCL/tk process.
START /B sbcl-shen.exe
C:\ActiveTcl\bin\wish....
0
votes
0
answers
23
views
Kill mouse event
I am wondering is there a way with Python that
we can detect process that use a click event so we can kill them.
That would help in the step of an anti cheat
I asked my friend if he can code something ...
0
votes
0
answers
78
views
.NET Process.OutputDataReceived still receiving data after unsubscribe the Event Handler and Kill the Process
Please. I need to read data from a process asynchronously because sometimes data is received indefinitely and cannot be read synchronously. When I have read enough characters, I unsubscribe from the ...
1
vote
1
answer
98
views
C++ kill() crashes linux to login screen
i am having problems with a project of mine,
i am creating child processes with fork and then terminating them with kill(pid,SIGINT) and then restarting them
after the second time interrupting the ...
0
votes
2
answers
54
views
How kill previous activities
In my app I have in the mainActivity intent that move mw to the second activity and in the second activity I have also intent that move me to the main activity.
Now when I press the back button in my ...
0
votes
1
answer
104
views
Why does my Bash script give an error at the end of ps command when I terminate background a process?
So for my class I am tasked to write a script, everything works fine until after the ps command finishes output it also adds an error message (script.sh: line 42: PID Terminated sleep 900 &) ...
3
votes
1
answer
326
views
Rust kill std::process::Child after finishing executing
I spawned a child process with:
let child = Command::new("./chromedriver")
.spawn()
.expect("Failed To Run Chromedriver");
I want to kill it at the end of the execution ...
0
votes
0
answers
183
views
Error message when killing process in bash
Linux version: Linux <server_alias> 3.10.0-1160.76.1.el7.x86_64 #1 SMP Tue Jul 26 14:15:37 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
I have the following function :
killProc () {
local ...
-3
votes
1
answer
415
views
linux: cannot use kill with verbose [closed]
I try to find a list of processes and kill them using verbose option, but not successful.
$ kill --verbose -9 $(ps -eo pid,cmd | grep cmd_name | grep -v grep | awk '{ print $1 }')
bash: kill: -verbose:...
0
votes
0
answers
39
views
How Can I handle subprocess when a process is killed by lack of memory?
I'm trying to handle an error when a subprocess doesn't run because of a lack of memory. However, no exception is working in this case. What should I use?
ribodetector = [
"ribodetector_cpu&...
0
votes
0
answers
238
views
Find, stop and restart a process with bash script
I'm running 'motion' on a Raspberry Pi and need to periodically restart it (or other processes).
#!/bin/bash
# find and restart running process motion
sudo kill $(pgrep -f motion)
sleep 5
echo "...
0
votes
1
answer
5k
views
How do I kill/remove the process currently using a port on localhost in Windows?
I do not have admin permissions on my computer. I am trying to kill the processes of a localhost port.
I have tried netstat -ano | findstr :6543 and taskkill /PID 6360 /F and it said ERROR: The ...
0
votes
0
answers
105
views
The process of JVM was killed by an unknown reason
In the production environment。The process of JVM was killed by an unknown reason.
jdk_version:dk1.8.0_66
add jvm params:
XX:+UseG1GC -Xmx10g -Xms10g -XX:ErrorFile=/opt/log/error.log -XX:+...
1
vote
0
answers
635
views
Properly run and kill background process in a python script/pytest
I am writing some unit tests for a python program that requires the background execution of a port-forwarding command to query a service.
The program is a Kubernetes operator written in python using ...
-1
votes
1
answer
147
views
Android Activity doesn't seem do be destroyed after ondestroy
I'm doing an app that asks every 10 seconds what i'm doing and to do that i've made a "dialog activity" that creates a multiple choice, here is the code:
import android.app.AlertDialog
...
1
vote
1
answer
123
views
killing child process in Node.js
If the child process is caught in an infinite loop, the 'exit' event is never handled.
How do you force a worker to stop in this case?
"use strict";
(async () => {
const cluster = ...
0
votes
1
answer
444
views
How can I kill a php-fpm process without the signal being logged in the fpm log
I have a function that through exec() kills a php-fpm process.
exec("kill -9 ".$pid);
Everytime I call it, a line gets added to the php-fpm log
WARNING: [pool xxxxxx] child 18120 exited on ...
0
votes
1
answer
54
views
How to pass kerberos cred from Java
we are tyring to kill the yarn job from Java using http put call
with out kerberos it was working..
but after we enabling kerberos we are getting 403 error
we are able to generate kerberos credentials ...
0
votes
1
answer
209
views
Upon git commit I see error `git-seekret died of signal 9`
Any time I run git commit I get the following error:
error: git-seekret died of signal 9
This error occurs no matter what changes I am committing, small or large. It happens on all repos on my ...
0
votes
1
answer
488
views
How Can I found the process id of a console app in debug from visual studio?
I got a Visual Studio solution with a console project inside. When running in debug the console application it seems to run till it ends. But apparently, the corresponding *.exe is still in use, since ...
0
votes
0
answers
66
views
Node.js process.kill() is not killing a child process on Windows OS
I want to kill a child process created using spawn in Node.js
Its working fine on Linux OS
var spawn = require('child_process').spawn;
var child = spawn('kate', {detached: true}); // to open Kate ...
-2
votes
1
answer
327
views
bash/zsh: kill parent process and suppress the output
I'm kinda new to bash and I'm trying to do a bash script myself that can check and install specified packages if they are not present in the system. It should be called in some other script, and if ...
3
votes
2
answers
2k
views
Serve and request in the same python script
I am trying to briefly spin up an HTTP server, so that I can call a subprocess that needs to access local files over HTTP, but running the server using the following code blocks further code from ...
-1
votes
1
answer
126
views
I want to kill steam.exe and some extra steam process but I don't know how to do it in VB.NET
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Dim steamkill() As String = {"steamwebhelper.exe", "steam.exe", "steamservice.exe"}
...
0
votes
1
answer
62
views
How would a previously started Thread within a Service be stopped if said Service is killed by the system and later restarted?
If a Service implements a thread, it would hold the reference to it using a class field, so that it could later stop the thread by calling the proper methods (e.g. quit() or quitSafely() in the case ...
-1
votes
1
answer
68
views
Parent process kill() child process but then doesn't respond to read() or printf()?
When the child process executing the program a is sent the signal SIGTERM, it should output to the stdout just before terminating. But my read() in (signal == 1) is running? I get no output from the ...
0
votes
1
answer
153
views
task for set alarm with using fork()
I'm doing task which is Signal Communication with Separate Alarms and Parent-to-Child Signal.
but i got a question about the output i got.
#include <signal.h>
#include <stdio.h>
#include &...
0
votes
0
answers
171
views
Kill snowflake query after UI timeout (PHP)
A UI timeout is happening in 65 seconds, and the long query keeps running in Snowflake. Once UI hits the timeout, I want to kill all these running queries from PHP backend code.
Is there any way to ...
0
votes
1
answer
64
views
python - instance of class gets deleted once executed. cannot kill subprocess anymore
I am trying to run Flask in a subprocess, so it gets its own core. so far so good. The code that starts flask in a subprocess is in my flaskSubprocess.py file, and can be seen below. In my main I ...
0
votes
0
answers
160
views
Kill -SIGINT not working from java but working from terminal
I start a c program from java which collect data from a usb device and write to a file . like Below
Runtime run = Runtime.getRuntime();
Process cprocess = run.exec(command);
cprocesses....
0
votes
1
answer
39
views
How to fetch not the current branch and merge it with the current, without branch checkout
I usually work in the project which branches have so many differences, branch checkout is similar to start a new project. With branch checkout, IDE just hangs because too many changes (more than 2 ...
0
votes
1
answer
117
views
Popen subprocess creates two processes
I am using this code to make a killswitch for my program
killSwitch = Popen(['killswitch.exe', str(pid)])
it feeds in the pid of the main thread, if the main thread becomes unresponsive i can use a ...
0
votes
3
answers
2k
views
How to kill already in use port in React Native?
It shows this error
error listen EADDRINUSE: address already in use :::8081.
Error: listen EADDRINUSE: address already in use :::8081
Things i have tried
kill -9, killall node, adb reconnect etc ...
1
vote
1
answer
115
views
Is Killing Child Process PID Guaranteed Safe After fork()?
Consider the following situation:
I use fork() to create a child process from my program
Parent process receives the PID as 1234.
Child process then calls execvp("myotherprogram", some_args)...
2
votes
1
answer
171
views
How do I write a emacs hook to prompt before killing a dired buffer?
I have a buffer of a directory using the dired command. I have some marked files in that buffer and I want emacs to prompt me before I kill the buffer. I understand I have to write a hook but don't ...
-1
votes
1
answer
293
views
How can I kill a running exe when a particular file is deleted using c# console program
I have a requirement such that if a file in particular path is deleted, then my program should kill an running exe program and sleep for 5 minutes so that my software will automatically start the same ...
-3
votes
3
answers
2k
views
Difference between clear terminal and kill terminal in VS Code?
I am coding on an M2 Macbook Air, and when right clicking on the termial in VS Code, I see 2 commands: kill terminal and clear. What is the difference between both? They seem fairly similar.
0
votes
1
answer
129
views
App Kill specific app by package name, clear its cache and Run the app again
I'm getting crazy while trying to make an app that will
kill specific other app
clear the killed app cache
restart the killed app again
for Android TV 10
lets call this app "the killer app"...
1
vote
1
answer
602
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.
...