Questions tagged [kill]

1

votes
0

answer
82

Views

Why doesn't bash catch the signal from the Java's process.destroy() [duplicate]

This question already has an answer here: Sending a POSIX signal from the JVM 2 answers how can I kill a Linux process in java with SIGKILL Process.destroy() does SIGTERM 4 answers A Script For Testing The script below just hangs until you press Ctrl+C, then it takes two seconds to shut down. I w...
1

votes
1

answer
59

Views

Signal Handler Behavior

I have just some questions about the system calls signal, kill and the signal handler. I have this code: int figlio=-1; int main(int argc,char* argv[]) int pid1,pid2,dormi,numero; float reciproco; signal(SIGUSR1,gestore); signal(SIGUSR2,gestore); numero=atoi(argv[1]); printf('Numero %d\n\n',numero);...
FurioShow
1

votes
0

answer
95

Views

VB.NET check if specific process is running by specific username then kill it

I try create app, that will be checking (using timer) if users trying run cmd.exe in Administrator privileges, if yes, then I want to kill it. I don't know how to do it. below is code that I'm using but... give me an error when no cmd's is runing. PS: this application is running by standard user and...
John Doe
1

votes
0

answer
95

Views

Exception during killing a call programatically on Oreo

I am trying to kill a phone call programatically in Android Oreo. Here is my source code. public boolean killCall(Context context) { try { TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); Method m1 = tm.getClass().getDeclaredMethod('getITelephony'); m1.se...
Ali Akram
1

votes
0

answer
56

Views

Who kills my process? Crash generates SIGHUP?

I have a python script running on my Ubuntu server. Occasionally I return to find a hangup SIGHUP message has been sent to the process, which definitely wasn't me. The kernel logs in /var/log/kern.log are empty and there are no results with 'dmesg | grep -i kill' so this makes me conclude it wasn't...
JSStuball
1

votes
1

answer
97

Views

How to clean zombie process

do as follows: [email protected]:/ # ps | grep native root 4064 3956 80160 8012 futex_wait b6d795ec S nativecamera [email protected]:/ # kill 4064 [email protected]:/ # ps | grep native root 4064 3956 0 0 do_exit 00000000 Z nativecamera ki...
lenge
0

votes
0

answer
5

Views

Kill the process for a remote computer by Python

I have designed an application by PYQT5 and python 3.6 to kill the process in localhost by write the process name in 'lineEdit' then press 'kill' button to kill it. What I want is to kill the process in remote computer by fetching the data first then check the name of the process that I want to kill...
monamouv
1

votes
0

answer
152

Views

How to kill a running process in Linux shell without the use of pkill and pgrep commands?

In short, I'm trying to kill a process in the middle of its run. For example, I have a binary file test which runs something similar like: while (true) { // Do something } I'm calling this binary file via the system() function in C++ like so: const char* cmd = 'test'; system(cmd); Now is there any...
Andy Jin
1

votes
0

answer
17

Views

On what criteria does a kernel deems a process unresponsive? What stratergy does it uses to detect such process?

In ubuntu (am using 14.04) while executing certain programs or applications, the window turns greyscale and darker. When I googled I found that it can happen when a program becomes unresponsive. Is it correct? If yes, on what basis a program is deemed to be unresponsive? What stratergy is adopted to...
Arv
1

votes
1

answer
183

Views

Identify a process started in VB.Net to be able to kill it and all its children later

When starting a process in VB.Net, I would like to be able to identify it to later kill it and all its children if necessary. I launch my process this way : Dim mainProcessHandler As New ProcessStartInfo() Dim mainProcess As Process mainProcessHandler.FileName = 'something_01out18.bat' mainProcessHa...
Julien D
1

votes
1

answer
43

Views

applescript or shell script way to i. e. grep an applications “status” after i. e. killall -STOP it

If I pause an applications by killall -STOP it, is there a way to read this 'status' for later use? I want to write a short script that checks if the application is already stopped and if so start it again via killall -CONT and if not I want to be able to pause it.
Laut3
1

votes
0

answer
38

Views

Ignore Ctr+c on program for parent pid

I'm trying to make my own shell, and I am trying to get Ctrl+c so it closes child processes, but not the father(my_shell). This is my forking code: jobs_list[0].pid = fork(); if (jobs_list[0].pid == 0) { // Child process if (execvp(argumentos[0], argumentos) == -1) { perror('lsh'); } exit(EXIT_FAILU...
flaixman
1

votes
0

answer
19

Views

Determine time between SIGTERM ack and actuall kill

I am sending SIGTERM to a process, and it is taking some time to get killed. Can I somehow determine the time between the ack of SIGTERM and actual termination of process? I have tried doing this: while kill -0 ${pid};do echo `date` > /tmp/testRun.txt sleep 0.5 done But, is there a better way to get...
agyeya
1

votes
0

answer
72

Views

I want to kill a process but zygote relaunches it

I use android and I know the process I want to kill but everytime I kill it the zygote launches it back I don't know what deamon is monitoring the process neither which calls the zygote socket, please help me, internet! ps faux is not showing anything it is not an important process it is a process...
mranon
1

votes
1

answer
52

Views

Trigger a clean shutdown of a C application on Linux

Is it possible to trigger a 'clean' shutdown of an application written in C on a Linux system? By 'clean' I mean a solution for de-initializing interfaces, etc.. Like a destructor of an object in C++, but for my C application. I know that it is possible to shutdown services with systemd, but my appl...
Temnis
1

votes
6

answer
654

Views

what to do when windows goes in dreaded 100% cpu usage zombie mode

happens to me occasionally: I start my program in visual studio and due to some bug my program goes into 100% cpu usage and basically freezes windows completely. Only by utter patience requesting the task manager (takes forever to come up and paint itself) I can kill my process. Do others encounter...
Toad
1

votes
1

answer
495

Views

killing a process kills other processes

I have a shell script I wrote which does the following steps within a finite loop: I spawn a process, and wait for it to finish. If it does not finish within 40 seconds, I execute: kill -SIGTERM pid I have found sometimes, even by doing the kill -SIGTERM pid, the process doesn't respond to being kil...
Melissa W
1

votes
1

answer
729

Views

Killing all thread workers when one thread found the answer (ruby)

Here is a sample program: def worker(from, to) puts '#{from}..#{to}' for i in from..to do if i == 42 puts 'kill the rest of the threads' break; end puts i sleep 1 end end if __FILE__ == $0 threads = [] for i in 0..9 do threads
parasquid
1

votes
3

answer
4k

Views

running pskill.exe “access denied”

Im attempting to kill a process remotely by using pskill. From the command line, pskill works great, but when trying the same command in C# Im getting an access denied error. var startInfo = new ProcessStartInfo { FileName = 'pskill.exe', Arguments = '-t \\' + _currentMachine + ' -u BobSmith -p Pas...
Coward
1

votes
5

answer
337

Views

What is the best way to close this group of processes?

I have the following group of processes, which need to be closed programmatically by the first listed process, which is a C program that I am coding. PID PGRP SESN PPID USER TTY CMD 6553 6553 6553 1 root ? ./startserv 6554 6553 6553 6553 root ? expect -- /usr...
conartist6
1

votes
2

answer
4.8k

Views

Handle force close?

Is there a way to notify an activity/service of a force-close request right before it gets killed? I mean when the user hits the force close button in Menu > Settings > Applications > Manage applications > app name > Force Close.
Shatazone
1

votes
1

answer
598

Views

Android SL4A (Python) Force Stop Packages fails.

I'm trying to terminate task using code like this: import android droid = android.Android() running = droid.getRunningPackages()[1] for task in running: if (task.find('skype') != -1) droid.forceStopPackages(task) this works properly except killing call `droid.forceStopPackages(task)` # When we get...
Oleksandr
1

votes
2

answer
1.1k

Views

Will android kill my daemon which is running as root?

I have an app that (has a part that) needs to always run; it's not started as a service, the app starts a daemon (written in c) which runs as root. Is android going to kill it on me to reclaim memory? Does it running as root protect me from this? If not, what can I do to ensure that it never dies a...
cidermonkey
1

votes
1

answer
803

Views

Get notified when a process end or is killed on Android

I've been digging the web in quest of finding nice, androidish solution for this concrete problem, but havent found one, so here I am, posting my first question on StackOverflow. To elaborate on my problem, I have a full-fledged aidl service, to which some other processes bind. My service will alloc...
Giorgi
1

votes
1

answer
341

Views

GDB run as subprocess stops parent process after receiving a 'kill -9'

I am running automated tests in python by running a script that runs a batched instance of GDB. If the output meets certain conditions I kill the pid of gdb so I can launch a new instance of GDB. I am running GDB only to log backtraces in case of segfaults. My issue is that killing the GDB instan...
cdated
1

votes
2

answer
997

Views

bash script does not appear in ps aux output : how to kill?

I have done some googling on this but not come up with an answer ... frustration is setting in! I want to kill my bash script. This executes various other processes. I can kill any process for which I have a PID; but ps aux | grep myuserid shows up only the 'other processes', not the script itself....
bobox
1

votes
1

answer
362

Views

Closing a running program via bash script [closed]

I've tried searching for this a few times, but I just think I don't know the right terminology. I have an application running in a screen session on a remote server. I'm periodically developing and updating the server, and use a Git repo to transfer my code. I'd like to automate this process. Here's...
xanderflood
1

votes
1

answer
34

Views

Is a file's 'Last modify' information correct after killing its process?

Does Windows XP guarantee that a file's 'last modify' information (which can be read with _stat64) is correct, even if the process that created it (and left it open) was killed with the task manager, etc' ? (not including pulling out the power cord) From an experiment it looks like it closes the fi...
Liran Orevi
1

votes
1

answer
180

Views

embedded system kill process: Is it safe? Why not?

I am designing a networked embedded application, that can span multiple machines. The applications is divided between these machines. Now, when it comes to exerting explicit control on this system, there are two options: (1). A nicely managed strategy in which the application nicely releases resourc...
devendra rai
1

votes
1

answer
1.4k

Views

Stop Android for killing my Activity after 30 minutes from background

I am creating an application where there is an activity which contains a timer running when ever user comes to that screen. If user leaves that screen by pressing home button without stopping the timer then the user is notified by the notification and then if the user again come back to the app from...
Pirate
1

votes
1

answer
199

Views

If I kill script running script running java?

If I kill gracefully (without -9) a script which is running another script, which is running java in turn, will java process receive kill signal by cascade?
Suzan Cioc
1

votes
1

answer
1.6k

Views

Autohotkey kill hung process

I discovered a way to find a hung process, but no matter what method I use I can't seem to kill it: #Persistent Menu, Tray, Icon, User32.dll, 2 SMTO_NOTIMEOUTIFNOTHUNG := 8 Delay = 200 SetTimer, CheckAllWindows, 10 Return CheckAllWindows: SetTimer, CheckAllWindows, Off WinG...
Max Nachamkin
1

votes
3

answer
2k

Views

No command executed after performing kill command in shell script

Here is my shell script: #!/bin/bash PIDS=$(ps -e | grep $1 |grep -v grep| awk '{print $1}') kill -s SIGINT $PIDS echo 'Done sendings signal' I am passing the name of the process as command line argument. The echo command is not getting executed, although the target processes are actually receiving...
Atharva
1

votes
2

answer
1.8k

Views

How in Oracle kill user session silent or reproduce error 17410?

I need to test robustness of my application for problem with network. But I don't have access to network physically. I have only access to Oracle as SYS. Does it possible may be silent kill user session so when application try to get data from connection jdbc driver will generate error 17410 ? oracl...
user710818
1

votes
1

answer
1.6k

Views

Why not have tomcat stop force as a synchronous operation

In Tomcat 7, when the container is stopped using catalina.sh stop force, the script uses the CATALINA_PID environment variable to send a kill -9 to the pid of the currently running container process. However, this doesn't kill the process instantaneously - say for e.g. when the process is in the mid...
Kilokahn
1

votes
1

answer
1.1k

Views

Manually closing subprocess.PIPE

I am using std = subprocess.PIPE and checking a particular term in every line of the output.If I get 'done', I manually kill the subprocess by os.kill : p = subprocess.Popen(['vprobe' ,'/vprobe/myhello.emt'], shell = False, stdout=subprocess.PIPE, preexec_fn=os.setsid) while True: line = p.stdout....
Core_Dumped
1

votes
1

answer
147

Views

Cancel scheduled UILocalNotification if app is killed

There will be a UILocalNotification scheduled in my app, but I found the scheduled UILocalNotification pops out even if I've killed the app. I don't think this is an expected behavior for my app. I am wondering if it is possible to cancel the scheduled UILocalNotification when user killed my app. Th...
mr.pppoe
1

votes
1

answer
232

Views

Bash script to kill screens with the same name

So I have a system that has multiple screens running at the same time, a list like: 2606.molamola19 (Detached) 13481.johnappy1 (Detached) 26017.Dylkill (Detached) 17061.legoman993 (Detached) 15984.legoman993 (Detached) 7418.taytotayto (Detached) 7336.wpgradford (Detached) 11913.twbon...
Jeremy Sayers
1

votes
1

answer
922

Views

How to avoid zombie processes when killing rake tasks?

I have a bash script that calls a few rake tasks in succession. This script is called by a continuous integration server. The problem is that if the integration server kills the task (by sending the script a SIGTERM), I can't get the entire process tree to get killed. For instance, if Rake is runnin...
Peter Groves
1

votes
2

answer
2.5k

Views

Kill Spring scheduled thread

Is there anyway to timeout a scheduled task (kill thread) in Spring if the task takes to long or even hangs because of remote resource unavailability In my case, tasks can take too long or even hang because they're based on HtmlUnitDriver (Selenium) sequence of steps, but from time to time it hangs...
frandevel

View additional questions