Jump to content


kill(pid,sig) in windows


3 replies to this topic

#1 kenna

    New Member

  • Members
  • Pip
  • 8 posts

Posted 16 May 2007 - 12:16 PM

Hi,

is there an equivalent function in windows or is it possible to emulate the kill(pid,sig) function?

I don't know of any other simple way of interprocess communication, since pipes, sockets, etc. is simply too much of a bother, signals are much easier and quicker to use.

EDIT: and ofcourse I mean in C (^_^)

#2 Kenneth Gorking

    Senior Member

  • Members
  • PipPipPipPip
  • 939 posts

Posted 16 May 2007 - 01:47 PM

This old sample is in C++, but all the functions for finding the running processes and how to kill them will be easy to extract. Happy killing :)
"Stupid bug! You go squish now!!" - Homer Simpson

#3 kenna

    New Member

  • Members
  • Pip
  • 8 posts

Posted 16 May 2007 - 01:52 PM

Thanks for the example, I'll be sure to go through it thoroughly to see if I can find anything useful.

However, the problem here is not terminating a process, but sending signals between processes, e.g. kill(pid, SIGINT), to allow for interrupt-like communication between processes. I haven't found any information for this on the internet, except that windows doesn't use signals as IPC, so you can only use raise.

Any suggestions as how to use signals, or a signal-like system for IPC in windows?

#4 Jare

    Valued Member

  • Members
  • PipPipPip
  • 247 posts

Posted 16 May 2007 - 03:43 PM

http://www.codeproje...nt_Handling.asp





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users