- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- HP forward mail function
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
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
Community
Resources
Forums
Blogs
- 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
06-11-2006 10:46 PM
06-11-2006 10:46 PM
I wrote a script for mail forwarding. Now I need a fuctionality like lockfile (linux) for HPUX. That function waits until one process is done, before another one can start.
Does anyone have any idea?
Thanks for any help
Barbara
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2006 01:41 AM
06-12-2006 01:41 AM
Re: HP forward mail function
There are a few ways to accomplish what you want. Depending on how your script is written, you may be able to take advantage of the 'wait' command. 'wait' waits for background processes (executed with '&') to complete before continuing execution.
For example:
cmd1 &
cmd2 &
wait
cmd3
'cmd1' and 'cmd2' are run in parallel. 'cmd3' won't be executed until 'cmd1' and 'cmd2' have completed.
Or you could simulate a lockfile by having the first process create a temp file, and blocking execution of the second process as long as that lockfile exists.
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2006 01:53 AM
06-12-2006 01:53 AM
Solution# check to ensure there is only one user running this script:
MYPID=$$
print $MYPID > /tmp/pid.lck
if [[ -f /tmp/pid.lck ]]
then
exit 1
else
continue
fi
then last command of script rm $MYPID
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2006 02:03 AM
06-12-2006 02:03 AM
Re: HP forward mail function
the skript worked great !! thanks so much
smiles
Barbara
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2006 02:06 AM
06-12-2006 02:06 AM