Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.