LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 01-26-2004, 04:21 PM   #1
vanalex
LQ Newbie
 
Registered: Dec 2003
Location: Vancouver, B.C.
Distribution: Red Hat 9
Posts: 3

Rep: Reputation: 0
pidof -o %PPID program


Hello

Please, help me someone to undestand how the program pidof works.

In the script /etc/rc.d/init.d/functions I see the following how to get PID:

pid=`pidof -o $$ -o $PPID -o %PPID -x $1`


I do not understand the meaning of %PPID. I think bash interprets it as a regular string, so what does it mean for program pidof?
 
Old 01-26-2004, 05:31 PM   #2
Looking_Lost
Senior Member
 
Registered: Apr 2003
Location: Eire
Distribution: Slackware 12.0, OpenSuse 10.3
Posts: 1,120

Rep: Reputation: 45
a quick man pidof - %PPID is a special variable which represents the parent process id of the script which pidof is in, in this case I assume it is the id of functions, unless I'm reading it wrong.
 
Old 01-26-2004, 09:35 PM   #3
vanalex
LQ Newbie
 
Registered: Dec 2003
Location: Vancouver, B.C.
Distribution: Red Hat 9
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for your reply


I do know that $PPID is interpretted by bash shell as the PID of parrent process, however what is %PPID - I do not understand that percent sign% .

Last edited by vanalex; 01-26-2004 at 10:08 PM.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash programming - using pidof sceadu Programming 4 07-26-2005 01:03 AM
strange pid and ppid problem asvija Linux - General 1 03-10-2005 01:53 AM
how to make ppid of a process as init without killing its parent shantha Programming 10 12-17-2004 07:36 AM
how to get PID without using pidof command? ruchika Programming 2 09-22-2003 03:12 PM
Psmisc, pidof - Ch 6.56.2, Sysvinit or not? itsjustme Linux From Scratch 1 07-28-2003 06:57 PM


All times are GMT -5. The time now is 11:35 PM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration