Recent

Author Topic: Kill apps under linux  (Read 4497 times)

filipenf

  • Newbie
  • Posts: 5
Kill apps under linux
« on: May 30, 2005, 08:30:34 pm »
I'm creating a updater for my program and I need to kill the program when I need to download the newest version.
First of all I need to list all process on the machine, to discover what pids to kill.
In the Linux API there is a way to do that? Where can I find more info about this?


Thanks

matthijs

  • Hero Member
  • *****
  • Posts: 537
Kill apps under linux
« Reply #1 on: May 30, 2005, 11:25:05 pm »
Have a look at this. And think of commands like ps.
To get a list of running processes you use ps. Catch the output and extract the process ID from your program. Then issue the kill -9 <pid> command.
What's in a sig? Would my posting look less if it didnot have a sig? (Free after William S.) :)

:( Why cannot I upload my own Avatar? :(

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2706
Kill apps under linux
« Reply #2 on: June 01, 2005, 07:00:46 pm »
if you wamt to do it in code, use fpKill()
don't know how to get a process list
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

 

TinyPortal © 2005-2018