LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux process call examles (https://www.linuxquestions.org/questions/linux-newbie-8/linux-process-call-examles-4175544566/)

balchans 06-05-2015 04:24 AM

Linux process call examles
 
hi all
i am new to linux system programming.
request u to give idea with examples for linux process creation fork() and exec setsig() setalarm(). how to catch these process id's

Regards
Bala

pan64 06-05-2015 06:24 AM

http://www.yolinux.com/TUTORIALS/ForkExecProcesses.html

joec@home 06-05-2015 02:11 PM

Depending on how complex or simple your needs, on more simple projects I prefer job control over fork. Look in the bash man page under JOB CONTROL.

Example:

echo Something &
[1] 4807
Something


In this instance, the "&" sent the command to a background job being job #1 and proc id 4807. For smaller projects it is a lot easier to deal with.

balchans 06-07-2015 11:20 AM

thanks to pan64 and Joseph will try it out and post if any further queries.


All times are GMT -5. The time now is 12:57 PM.