11-02-2005
"hang" is not a very technical term. If a program is taking a very long time it may be doing everything right. Or it may have a bug and be in an infinite loop. nohup will certainly not help you here. No reasonable person would think that it should. But if you type a command like:
/usr/bin/cat
the program will wait for input from the tty. If you don't know that, you may be staring at a screen wait for the cat command to end. This is a special type of "hang"...waiting for tty input. Should nohup protect you from this? Maybe it should, but it is surprisingly hard to do this safely. For better or worse, nohup does not protect you from this either. You can use "at now" to run stuff completely disconnected from a tty. And you're on your own if you have infinite loops.
10 More Discussions You Might Find Interesting
1. HP-UX
I have an HP J6700 using an Emulex L9002 fc 2gb HBA .
The OS is 10.26 secured OS for Military applications.
When we run a vi editor on our internal disk the 512k it works fine (internal disk is 18gb).
When I run it on a external raid it hangs the process.
its not hanging the raid but the... (1 Reply)
Discussion started by: diskman
1 Replies
2. Shell Programming and Scripting
I want to print the pid of a nohup process to a file so later I can use the list of pid's in that file to stop the background processes again.
I use ksh on AIXv5.3:
nohup /start/script.ksh 1>/dev/null 2>&1
print $$ > .pid
nohup /start/script2.ksh 1>/dev/null 2>&1
print $$ >> .pid
But... (2 Replies)
Discussion started by: rein
2 Replies
3. AIX
To All:
I have this AIX machine (see boot process below). The problem was it hangs at:
The ctrmc Subsystem has been started. Subsystem PID is 11906..
I checked with other forums but their advise were just "strong punches in the air" with no specific explanation.
I really appreciate if... (6 Replies)
Discussion started by: aix_xia
6 Replies
4. UNIX for Advanced & Expert Users
What is the difference between running a process using nohup and running a process in background ? Please explain (6 Replies)
Discussion started by: srksn
6 Replies
5. UNIX for Advanced & Expert Users
Hi,
I have used nohup command to run a process in background. i ran successfully and i exit from that terminal. But when i login for the next time I am not able to see the process but it is working, since I am getting a e-mail alert for error issue. Please let me know how to bring that process... (3 Replies)
Discussion started by: mbguy
3 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I need execute a script every 30 minutes. As might be done without using cron
Thx. (6 Replies)
Discussion started by: pepeli30
6 Replies
7. UNIX for Dummies Questions & Answers
OS : AIX 6.1/Solaris 10
After I started running a shell script, I've realized that it will take another 5 hours to complete. Is there anyway I could convert this foreground process to run in nohup mode so that I can go home peacefully ?
I have the process ID
$ ps -ef | grep... (4 Replies)
Discussion started by: kraljic
4 Replies
8. Shell Programming and Scripting
Hi ALL,
Is there any way to pause a running process under nohup ?
I have fired a build commands with required flags under nohup as below. now how can
I pause the started build process.
nohup make DEVICE=ap DEBUG=1 &
I understand we can use ctrl + z to pause a foreground process... (3 Replies)
Discussion started by: useless79
3 Replies
9. Shell Programming and Scripting
Hi,
I am running below code:
for i in `ls`
do
nohup sqlldr userid=apps/apps data=data01.dat log=my1.log control=my.ctl bad=my1.bad direct=yes silent=all parallel=true &
done
This will run the sqlldr command in parallel as a background process.
I want to store the process Id each... (7 Replies)
Discussion started by: Pratiksha Mehra
7 Replies
10. UNIX for Advanced & Expert Users
Hi All,
I am facing issue in running a process in nohup. I ran a process in terminal since it is taking too long to complete I need to make it as background and nohup. I tried below and was able to make it in back ground
1. Cntrl + Z
2. bg
I am using Korn Shell so disown is not working... (5 Replies)
Discussion started by: arunkumar_mca
5 Replies
NOHUP(1) User Commands NOHUP(1)
NAME
nohup - run a command immune to hangups, with output to a non-tty
SYNOPSIS
nohup COMMAND [ARG]...
nohup OPTION
DESCRIPTION
Run COMMAND, ignoring hangup signals.
--help display this help and exit
--version
output version information and exit
If standard input is a terminal, redirect it from /dev/null. If standard output is a terminal, append output to `nohup.out' if possible,
`$HOME/nohup.out' otherwise. If standard error is a terminal, redirect it to standard output. To save output to FILE, use `nohup COMMAND
> FILE'.
NOTE: your shell may have its own version of nohup, which usually supersedes the version described here. Please refer to your shell's doc-
umentation for details about the options it supports.
AUTHOR
Written by Jim Meyering.
REPORTING BUGS
Report nohup bugs to bug-coreutils@gnu.org
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
Report nohup translation bugs to <http://translationproject.org/team/>
COPYRIGHT
Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
SEE ALSO
The full documentation for nohup is maintained as a Texinfo manual. If the info and nohup programs are properly installed at your site,
the command
info coreutils 'nohup invocation'
should give you access to the complete manual.
GNU coreutils 8.12.197-032bb September 2011 NOHUP(1)