- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- using wait command on completed jobs
Operating System - HP-UX
1753529
Members
5263
Online
108795
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2001 05:15 AM
тАО03-22-2001 05:15 AM
using wait command on completed jobs
If the wait command is issued on a process ID, where the process ID relates to a job that has completed, and hence the process ID is no longer in existance, is it safe to assume that the returncode from the wait command would be 127?
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2001 05:23 AM
тАО03-22-2001 05:23 AM
Re: using wait command on completed jobs
I would say yes. Try it by issuing a wait against a non-existent pid and then issue the $? straight afterwards it should return 127.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2001 05:25 AM
тАО03-22-2001 05:25 AM
Re: using wait command on completed jobs
That should read echo $?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2001 06:03 AM
тАО03-22-2001 06:03 AM
Re: using wait command on completed jobs
From some experiments on both HP-UX 11.00 and 10.20, it appears that two waits of the form:
wait
will successfully return the return code from
A third wait returns 127.
Note this is when has been issued by the shell with &
Thus it is only safe to assume a response of 127 on the third (and subsequent calls to wait).
However if you use the format
wait
where is %1 for instance (or %% for the last job issued) then only the first wait returns the valid return code for the job. All subsequent waits of this form return 1.
Regards,
John
wait
will successfully return the return code from
A third wait returns 127.
Note this is when
Thus it is only safe to assume a response of 127 on the third (and subsequent calls to wait).
However if you use the format
wait
where
Regards,
John
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP