- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: question regarding background process in shell
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
Discussions
Discussions
Forums
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
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
тАО12-14-2003 10:13 PM
тАО12-14-2003 10:13 PM
Re: question regarding background process in shell
I have to say that it would seem to make sense to use a PID bearing in mind that that is what you prbably want, however I just checked man sh-posix and I get this
wait [job]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-14-2003 10:18 PM
тАО12-14-2003 10:18 PM
Re: question regarding background process in shell
So, i think that there are both the bulti-in command wait and the external command wait..
Look at this:
yomodvts:/var/mail> which wait
/usr/bin/wait
yomodvts:/var/mail> typeset wait
yomodvts:/var/mail> type wait
wait is a shell builtin.
yomodvts:/var/mail> file /usr/bin/wait
/usr/bin/wait: commands text
yomodvts:/var/mail> more /usr/bin/wait
#!/usr/bin/sh
# @(#) $Revision: 72.2 $
# This is the execable version of wait utility implemented
# using posix shell built-in wait command.
wait $@
exit $?
#################################
I didn't ever checked it before ,
sorry :(
We both were perfectly right.
Massimo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-14-2003 10:21 PM
тАО12-14-2003 10:21 PM
Re: question regarding background process in shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-14-2003 10:32 PM
тАО12-14-2003 10:32 PM
Re: question regarding background process in shell
Can anyone help me how to find memory used for a particular process???
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-14-2003 10:47 PM
тАО12-14-2003 10:47 PM
Re: question regarding background process in shell
I use backgound processes in a shell, when there is a chance, that the command issued may hang, like in my case ftp. I wait, see the return codes in the log file and after five minutes I terminate frp and start from scratch.
You can see the size of a process by:
UNIX95= ps -eo pid,ppid,sz
greetings,
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-14-2003 10:54 PM
тАО12-14-2003 10:54 PM
Re: question regarding background process in shell
I think you need to realise that unix is elegant. The only reason anything runs in the foreground at all is because processes open the terminal as their standard input and the shell thinks it would be a good idea to wait for them to finish. If you use the "&", the shell decides not to wait for it and the standard input is closed.
This means that resource wise, the two are almost identical.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-14-2003 10:56 PM
тАО12-14-2003 10:56 PM
Re: question regarding background process in shell
Look in the "sz" col of "ps -l"
"man ps" for more info.
-- Graham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-14-2003 11:31 PM
тАО12-14-2003 11:31 PM
Re: question regarding background process in shell
If you have the 'sleep' running in the foreground, any kill signal passed to the shell will be processed AFTER sleep exits. In the case where the shell is waiting for the background process signals will be processed IMMEDIATELY.
Of course, this matters only if your script has been written to process signals in some way e.g. trap 'whatever' n
Regards,
John
- « Previous
-
- 1
- 2
- Next »