LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-05-2015, 05:24 AM   #1
balchans
LQ Newbie
 
Registered: Sep 2013
Posts: 2

Rep: Reputation: Disabled
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
 
Old 06-05-2015, 07:24 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 8,503

Rep: Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434
http://www.yolinux.com/TUTORIALS/ForkExecProcesses.html
 
2 members found this post helpful.
Old 06-05-2015, 03:11 PM   #3
joec@home
Member
 
Registered: Sep 2009
Location: Galveston Tx
Posts: 291

Rep: Reputation: 70
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.

Last edited by joec@home; 06-05-2015 at 03:12 PM.
 
1 members found this post helpful.
Old 06-07-2015, 12:20 PM   #4
balchans
LQ Newbie
 
Registered: Sep 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
thanks to pan64 and Joseph will try it out and post if any further queries.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Create and Call a Process mailkamlesh Linux - Newbie 2 09-24-2010 07:56 AM
Call function in another process Gabbiadini Programming 1 10-27-2007 09:17 AM
Changing Process Priority in Linux w/ System Call sptchamp Programming 2 07-21-2004 10:58 AM


All times are GMT -5. The time now is 08:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration