- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: disassociate terminal from a running process?
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
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
тАО10-19-2009 10:52 AM
тАО10-19-2009 10:52 AM
disassociate terminal from a running process?
I'm not sure this is possible, but, I've been wrong before, so it's worth a quick question:
HPUX 11.23, pa-risc:
A cohort kicked off a database restore process about three hours ago with an expected duration of another 10 hours - so restarting isn't exactly an option.
Is there anyway that he can kick his job into the background and disassociate his terminal so he can log off and go home before 0200 tomorrow morning?
Linux apparently has a disown command which I have to try out sometime; however, I haven't been able to find/think up anything that will help this poor schmuck.
Thanks for any tips/suggestions.
Doug O'Leary
------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-19-2009 10:54 AM
тАО10-19-2009 10:54 AM
Re: disassociate terminal from a running process?
Doug
------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-19-2009 01:41 PM
тАО10-19-2009 01:41 PM
Re: disassociate terminal from a running process?
I am not familiar 11.23 ,but if I get correct your issue, did you try
nohup command &
I use it in 11.11 works good, but I am not sure if it has a timeout somehow ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-19-2009 04:26 PM
тАО10-19-2009 04:26 PM
Re: disassociate terminal from a running process?
nohup command &
is the one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-19-2009 04:56 PM
тАО10-19-2009 04:56 PM
Re: disassociate terminal from a running process?
Check this out:
1. Suspend the forground job with Ctrl+z
2. Use bg command to push it to Background.
3. Verify with 'jobs' commnd , you will see the job runnig in background.
Example:
# find / -name abc -print
[1]+ Stopped find / -name abc -print
# bg
[1]+ find / -name abc -print &
# ps -ef | grep -i find
root 4289 4217 4 19:50 pts/2 00:00:01 find / -name abc -print
#
# jobs
[1]+ Running find / -name raj -print &
#
--------------------------------------------
Cheers,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-19-2009 05:05 PM
тАО10-19-2009 05:05 PM
Re: disassociate terminal from a running process?
However if you want to leave the terminal (log off) you have the only option to start the process with "nohup" as menoned above . Otherwise it will terminate the process with logoff, even it is in background.
Example:
# nohup command &
# exit
- From another session yo can verify with ps command.
Hth,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-19-2009 06:05 PM
тАО10-19-2009 06:05 PM
Re: disassociate terminal from a running process?
I don't think I was clear; the process is already running and restarting it isn't really an option since it was already 3 hours into a 13 hour run. So, nohup ${cmd} is out.
I know about suspending the command and bg, however, if you log out, the process dies. I was hoping there was something like
nohup ${pid}
however, that obviously doesn't work.
As I expected, not possible to disassociate the terminal from an already active program...
Thanks for the responses.
Doug
------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-19-2009 10:08 PM
тАО10-19-2009 10:08 PM
Re: disassociate terminal from a running process?
still worth checking out:
http://en.wikipedia.org/wiki/GNU_Screen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-19-2009 10:27 PM
тАО10-19-2009 10:27 PM
Re: disassociate terminal from a running process?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-20-2009 01:47 AM
тАО10-20-2009 01:47 AM
Re: disassociate terminal from a running process?
And I don't think it can be done. Perhaps one of these threads?
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1364756
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1317746
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1304160
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1154094
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1119164
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1050233
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-20-2009 07:57 AM
тАО10-20-2009 07:57 AM
Re: disassociate terminal from a running process?
"disown" is a bash shell builtin...and not linux-dependent. If you've installed bash, *and* he/she is using that shell, it should work.
If they are using one of the std issue shells on HP-UX, then unfortunately that user is S.O.L... All of the alternatives available require that you take some action at the time the command is issued....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-20-2009 11:47 PM
тАО10-20-2009 11:47 PM
Re: disassociate terminal from a running process?
I'm not sure how? If the HP-UX kernel doesn't support, there is no way bash can.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-21-2009 03:23 PM
тАО10-21-2009 03:23 PM
Re: disassociate terminal from a running process?
Rash assumption on my part that bash was bash no matter where it runs. The man page says that it removes items from the "jobs table". Doesn't mention that that requires OS support.
I merely noted that it's *not* a separate executable, but a bash builtin. Having noted that, I'd expect bash to behave identically on all installations unless specifically noted otherwise.....
So much for expectations....