Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 07-19-2011, 10: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?
Old 07-19-2011, 10:17 AM   #2
LQ Guru
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

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

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

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.

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, 08:05 PM   #4
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.10, Centos 7.5
Posts: 17,565

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

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.
1 members found this post helpful.


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

All times are GMT -5. The time now is 05:59 AM.

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