Questions tagged [kill]

Kill is an operation of removing an object or process from memory so that other processes/variables can use them.

1603 questions
0
votes
2 answers

Killing a Thread (by using multiprocessing?)

I have a Python 2.7 GUI where a plot is generated by pressing a Button. The calculation for the plot takes several seconds. By using threading.Thread, the GUI is not blocked during calculation. If I want to recalculate while the first calculation is…
dolby
  • 643
  • 1
  • 8
  • 10
0
votes
1 answer

How to modify script to exclude some processes?

Welcome, I have a short script to kill processes which works longer than specified time for UIDs bigger than. How to exclude for example mc command from killing? #!/bin/bash # #Put the minimum(!) UID to kill processes UID_KILL=500 #Put the time in…
Janek
  • 51
  • 10
0
votes
2 answers

Run code for a certain length of time and kill if necessary

I'm using the scripting bridge to query iTunes from my cocoa application. Sometimes iTunes pops up a window (like if an ipod needs updating etc.) and while that popup window is open I can't get any information from iTunes. So if I request…
regulus6633
  • 18,848
  • 5
  • 41
  • 49
0
votes
0 answers

Kill and Sleep command Not working properly in bash script

I have a bash script: #!/bin/sh for ((i=0; i<=10; i++)); do ssh "w$i" 'uptime;ps -elf|grep httpd|wc -l;free -m;mpstat' done & pid=$! sleep 3 kill -9 $pid I want to kill the ssh within the for loop, if it does not complete within 3 seconds. But…
Tomas
  • 514
  • 4
  • 13
  • 37
0
votes
2 answers

How to detect killing of an application?

Imagine, we have two .net applications. Application "A" starts application "B" using System.Diagnostics.Process class. Then "A" wants to kill "B" by method Process.Kill. How "B" can determine that somebody is killing him?
Oleksandr G
  • 2,060
  • 3
  • 22
  • 31
0
votes
6 answers

Kill Command in linux

I have a bash script abcd.sh,in which I want to kill this command(/usr/local/bin/wrun 'uptime;ps -elf|grep httpd|wc -l;free -m;mpstat') after 5 sec but in this script it kill sleep command after 5 second. #!/bin/sh /usr/local/bin/wrun 'uptime;ps…
Tomas
  • 514
  • 4
  • 13
  • 37
0
votes
2 answers

how to kill 2 processes in linux

I have two programs running simultaneously ( in linux ) , with one running at the background. When i press ctrl+c , the prompt returns , but the processes seem to continue.. How to kill them both ?
trinity
  • 10,394
  • 15
  • 49
  • 67
0
votes
2 answers

A user can close a script running by killing powershell task

How can I prevent a user from killing powershell process which ends the action of the script. and how can I restart powershell by a piece of code to resume its action?
Falah Abu Hassan
  • 105
  • 2
  • 11
0
votes
1 answer

why does it kill the app twice?

i set a service that checks if a specific process is running in time intervals by using: appsList = am.getRunningAppProcesses(); i saved its name and id with: s = pross.processName; i=pross.pid; i launch the default launcher with: Intent intent =…
0
votes
2 answers

C shell: kill process syntax

I'm trying to write my own C shell. I'm wondering how to make calling 'kill' in the command line work. For example, shell> kill 2 shell: process 2 has been killed Line 1 is user input 'kill 2' Line 2 is program-printed message of what has…
user3295674
  • 893
  • 5
  • 19
  • 42
0
votes
1 answer

Kill the incoming call screen and move him to background?

I want to move the incoming call screen to the background or kill it. I tried to kill the process com.android.phone once call is arriving but this action disables the signal for 10-20 seconds. Did I kill the wrong process?
Erez
  • 1
0
votes
2 answers

Is it safe to KILL an OPTIMIZE on InnoDB?

Is it safe to kill an OPTIMIZE query on an InnoDB table without corrupting the table? The MySQL docs says: However, killing a REPAIR TABLE or OPTIMIZE TABLE operation on a MyISAM table results in a table that is corrupted and is unusable (reads…
davey
  • 1,801
  • 2
  • 17
  • 22
0
votes
1 answer

Android does thread end itself after executing code

So, I'm searching on net for a while and now I'm confused... do I need to explicitly end thread after code is executed or thread does it automatically? Code: Runnable waitForInput = new Runnable() { public void run() { while (!inputOK)…
mgulan
  • 795
  • 1
  • 14
  • 33
0
votes
1 answer

Redirect stdin to provide no input at all?

In another question I asked I realized I want to redirect stdin but have it provide absolutely no input. For example, I want a call to getchar() to hang forever. I would then like to terminate the application by sending a kill signal. I tried…
boltup_im_coding
  • 6,345
  • 6
  • 40
  • 52
0
votes
1 answer

xargs kill: Failure

Consider the following command: ps ax | ack -i "[p]rocessname" | awk '{print $1}' This lists the PID's of the processes matching processname. When I attempt to kill each of these processes like this, ps ax | ack -i "[p]rocessname" | awk '{print…
krystah
  • 3,587
  • 2
  • 25
  • 43