LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 07-19-2011, 09:00 AM   #1
marcos egatz
LQ Newbie
 
Registered: Nov 2008
Posts: 8

Rep: Reputation: 0
Post Terminology disambiguation


Reading the man's page of bash's wait ("man 1 wait"), I've found myself with the problem of not being able to clarify the difference between the "process Id" and "job specification". So far I could have said that both terms are the same, but the man explicitly says (within the wait paragraph ): " n may be a process ID or a job specification". Could anyone give me an example of the difference between these two terms?
Regards
 
Old 07-19-2011, 09:17 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
The job specification is related to job control. Suppose you launch a command in background:
Code:
$ sleep 10 &
[1] 14513
Here 1 is the job ID, whereas 14513 is the process ID. The job specification is %jobID:
Code:
$ wait %1
[1]+  Done                    sleep 10   it appears after 10 seconds
 
1 members found this post helpful.
Old 07-19-2011, 09:32 AM   #3
SL00b
Member
 
Registered: Feb 2011
Location: LA, US
Distribution: SLES
Posts: 375

Rep: Reputation: 112Reputation: 112
The man page does give some definitions:

Quote:
The following operand shall be supported:

pid One of the following:

1. The unsigned decimal integer process ID of a command, for
which the utility is to wait for the termination.


2. A job control job ID (see the Base Definitions volume of
IEEE Std 1003.1-2001, Section 3.203, Job Control Job ID)
that identifies a background process group to be waited for.
The job control job ID notation is applicable only for invo-
cations of wait in the current shell execution environment;
see Shell Execution Environment . The exit status of wait
shall be determined by the last command in the pipeline.

Note:
The job control job ID type of pid is only available on
systems supporting the User Portability Utilities option.
So basically, it's looking for one or the other, process number or job ID. In Linux, we typically refer to that unsigned decimal process number as the pid. Since this is a POSIX man page, it's set up to be able to apply to a number of different operating systems (Linux is not 100% compliant), so the job ID probably doesn't apply to you. I'd quit worrying about it, and just understand that every time they say job ID, that means pid to you.
 
1 members found this post helpful.
Old 07-19-2011, 07:05 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,356

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Actually, colucix is correct and : jobid & pid are completely different entities.

Quote:
Note that this is different from the process id, which is a unique number assigned to all processes running on the system. The job id is a sequential number assigned to the processes associated with the current shell you are running. The first one you launch is 1, the second one is 2, and so forth.
http://people.ischool.berkeley.edu/~...section13.html
 
1 members found this post helpful.
  


Reply



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
Backup terminology Stin Linux - Newbie 2 05-13-2008 06:21 PM
Wireless Terminology cjcj Linux - Newbie 3 05-12-2008 11:50 AM
Terminology Confusion lazylogic Linux - Newbie 3 04-28-2008 02:00 PM
Linux Architecture Disambiguation demmylls Linux - General 1 09-13-2006 12:12 AM
Understanding terminology digantk Linux - General 9 10-18-2002 06:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:18 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
Open Source Consulting | Domain Registration