Helping ordinary people create extraordinary websites!
GET OUR NEWSLETTER
Your Email:
 

Port Windows IPC Apps to Linux, Part 1: Processes and Threads

By Srinivasan S. Muthuswamy, Kavitha Varadarajan
2005-06-16


Terminating a process

To forcibly terminate a running process, you can use TerminateProcess() in Windows.


BOOL TerminateProcess(
HANDLE hProcess, // handle to the process
UINT uExitCode // exit code for the process
);

This function terminates the running process and all the associated threads. Use this function only in extreme scenarios.

In Linux, you can use kill() to forcibly kill a process: int kill(pid_t pid, int sig). This system call terminates the process of id PID. You can also use it to signal to any group or process.



Tutorial Pages:
» A mapping guide for complex, multithreaded, multiprocess applications
» Processes
» Creating a process
» Terminating a process
» Using wait functions
» Exiting a process
» Environment variables
» Examples
» Threads
» Examples of processes and threads
» Next in the series
» Resources


First published by IBM DeveloperWorks


 | Bookmark
Related Tutorials:
» How to Install PHP 5 on Linux
» How to Install Apache 2 on Linux
» How to Install MySQL 5.0 on Linux
» SMB Caching
» Mound --Bind
» Tar Wild Card Interpretation

Advertise with Us!


Tutorials Scripts Web Hosting Developer Manuals
Resources