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
1 answer

Background Service without Activity

I'm trying to create an application that use a background service to connect to BluetoothDevice: Activity: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); …
Walter
  • 67
  • 12
0
votes
1 answer

Control timeout of system process in Rails

I am launching casperJS scripts from my controller as this: output = `casperjs #{path_to_file} '#{url}#'` And sometimes, for several reasons the casperjs script might hang, or might take a long time. I am wondering if there is anyway I can set a…
Hommer Smith
  • 26,772
  • 56
  • 167
  • 296
0
votes
2 answers

Run only one instance of a script running in the background at a time in ZSH / OS X

I have a script that runs in the background. It opens an SSH connection to a server and tails a file indefinitely. When I put my mac to sleep, the SSH connection is closed. Here is the script in question: #!/bin/sh (ssh @ -o…
Robert Audi
  • 8,019
  • 9
  • 45
  • 67
0
votes
1 answer

How to rescue "kill: Operation not permitted"?

I want to rescue "Operation not permitted" when killing a process but I don`t know how! def kill(process) process.each do |line| if line.include? "java" process_no = line.split[0] `kill -9…
3a4oT
  • 45
  • 8
0
votes
1 answer

bash command quoted by single quote

I need to find process by string matching, and the kill it, need to do it in one line in another script file: here's what I tried: 'kill $(ps -ef|grep xxx|grep -v grep | awk '{print $2 }' )' "kill $(ps -ef|grep xxx|grep -v grep | awk '{print $2…
user121196
  • 30,032
  • 57
  • 148
  • 198
0
votes
1 answer

Kill a script containing `time.sleep()`

I take notes in class on my computer and share these notes via a public folder on dropbox. When I take notes in class, I create a lot of unnecessary files (I take notes in LaTeX) before I generate a PDF. I don't want to clutter my dropbox space with…
inspectorG4dget
  • 110,290
  • 27
  • 149
  • 241
0
votes
0 answers

Automatically identify (and kill) processes with long processing time

I'm running a script that daily downloads, builds and checks a program I'm contributing to. The "check" part implies performing a suit of test runs and comparing results with the reference. As long as the program finishes (with or without errors),…
Jellby
  • 2,360
  • 3
  • 27
  • 56
0
votes
1 answer

Program hanged or stop execution randomly using fork() and signal

I have written a program where I have created a child process. Both the parent process and child process do calculation in two parts- parent_part1 , parent_part2 and child_part1, child_part2. My aim is to run the…
bholanath
  • 1,699
  • 1
  • 22
  • 40
0
votes
1 answer

how correctly to end all process of program

my program has event onClosing - just hide it. But also i need to implement closing of programm - try to use context menu of task bar notification item. code: private void FormMainForm_FormClosing(object sender, FormClosingEventArgs e) { …
hbk
  • 10,908
  • 11
  • 91
  • 124
0
votes
1 answer

kill process, start process

I'm looking for a VBScript that when a user clicks on it, it will check and see if the user is running the process winver.exe. If the process winver.exe is running under that user it will end the process, if the process winver.exe is not running it…
Derek R
  • 1
  • 1
0
votes
1 answer

C unix: sending a signal to a process with kill isn't the same that from keybord..why?

So I have this parent process A which forks and creates some processes, B and C. C itself will create more, but I don't think it matters. A forks: char *argv_exec[] = { "/usr/bin/xfce4-terminal", "--geometry", "160x48", "-x", …
sowdust
  • 87
  • 1
  • 9
0
votes
5 answers

How does one correctly kill processes in bash

I use the following script to kill process by timeout: # $1 - name of program and its command line #launch program and remember PID eval "$1" & PID=$! echo "Program '"$1"' started, PID="$PID i=1 while [ $i -le 300 ] do ps -p $PID >> /dev/null …
Shf
  • 3,463
  • 2
  • 26
  • 42
0
votes
1 answer

Selecting a value from output of ps -eaf

Suppose i want to select 6547 from this output of "ps -eaf" command, how do i do it? I want to select that value and give it to "kill" command to kill that process. root 6547 1 0 Aug07 ? 00:00:00 root 14805 2 0 Aug07 ? …
sattu
  • 632
  • 1
  • 22
  • 37
0
votes
0 answers

java background process ended without error message

I have a small java server listening on port 10299 for performing some image processing on demand. I start the program as follows: java -Xms15m -Xmx25m -jar /tools/image-server.jar > /tools/image-server.log & After an indeterminate period of time…
Andreas Pasch
  • 125
  • 1
  • 9
0
votes
1 answer

Stop/Kill Continuous Thread

I am attempting to continuously run a function that controls a stepper motor simultaneously while I plot incoming data. I can run the function but when I try to stop it with a keyboard interrupt the thread does not recognize it. Here is the code: …