Sponsored Content
Operating Systems Linux Red Hat Nohup with ampersand & process gets disconnected Post 303033397 by Don Cragun on Thursday 4th of April 2019 05:29:58 PM
Old 04-04-2019
Unfortunately, for backwards compatibility reasons /bin/sh on Solaris systems (at least up until Solaris 11) is a pure 1980's Bourne shell. To get a POSIX conforming shell on Solaris systems, their man pages, indirectly, say to use /usr/xpg4/bin/sh.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

nohup process hangs

Hi All, I tried searching for this, but I have yet to find anything useful. So here goes, if a script executed from another script with nohup & hangs, does it affect the parent script? Reason I ask, we have a windows box with NFS, and we use it to store some of our files. Currently, I mount the... (2 Replies)
Discussion started by: Sully
2 Replies

2. Shell Programming and Scripting

pid of nohup process

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. UNIX for Advanced & Expert Users

nohup and background process

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

4. Shell Programming and Scripting

Execute Script using nohup and &

Hi all, I have one script test.sh for which I pass two arguments. In the same script I need to submit this script in background using nohup. My script like this and it is working in HP-UX os but not Solaris. #! /bin/sh if then MTR_PID=$$ export MTR_PID echo "test.sh $1 $2... (3 Replies)
Discussion started by: sridhar_423
3 Replies

5. UNIX for Dummies Questions & Answers

nohup & mpiexec problems

Hi everyone - I'm trying to start a run of LAMMPS (which takes an input file) with mpiexec on multiple processors. I want to combine this with nohup so that I can log off the node. I've used the syntax below successfully on one cluster, but it doesn't work on the new one I'm using. Any... (0 Replies)
Discussion started by: erin85
0 Replies

6. Shell Programming and Scripting

Understanding ampersand (&) usage in the command

Please explain the usage of ampersand in the following command who & echo "Total number of users are `who|wc -l`" What I understand is that ampersand is used to run some process in the background. And, what I am expecting from this command is "Output of who should be displayed on the... (2 Replies)
Discussion started by: Shan_u2005
2 Replies

7. UNIX and Linux Applications

nohup and & versus functions

when i have a function definition and function call in my script , i am unable to run my script in background with nohup.. Help me out please..... (3 Replies)
Discussion started by: venugopalsmartb
3 Replies

8. UNIX for Advanced & Expert Users

Running process in nohup

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

9. UNIX for Dummies Questions & Answers

Difference between & and nohup &

Hi All, Can anyone please help me understanding what the difference between the below two? 1. script.sh & 2. nohup script.sh & (2 Replies)
Discussion started by: Anupam_Halder
2 Replies

10. Shell Programming and Scripting

Problems with ampersand (&) in sed command

Hello everybody, I have a Problem with sed command. I want to replace a defined string with a string from a database field (dynamic). e.g. sed -i -e 's/%NAME%/'"$HNAME"'/g' The Problem is that the $HNAME variable can contain Special characters like '&' e.g. HNAME="AH Kruger & Co. KG" ... (1 Reply)
Discussion started by: Bambuti2000
1 Replies
nice(1) 						      General Commands Manual							   nice(1)

Name
       nice, nohup - execute a command at a lower priority

Syntax
       nice [-number] command [arguments]

       nohup command [arguments]

Description
       The  command  executes command with low scheduling priority (Bourne Shell only).  If the number argument is present, the priority is incre-
       mented (higher numbers mean lower priorities) by that amount up to a limit of 20.  The default number is 10.

       The super-user may run commands with priority higher than normal by using a negative priority, for example, `--10'.

       The command executes command immune to hangup and terminate signals from the controlling terminal.  The priority is incremented by 5.   The
       command	should	be  invoked  from  the shell with an ampersand (&) in order to prevent it from responding to interrupts by or stealing the
       input from the next person who logs in on the same terminal.  The syntax of is also different.

Options
       -number		   Increments the priority by a specified number up to a limit of 20.  The default is 10.

Restrictions
       The and commands are particular to If you use then commands executed with an ampersand (&) are automatically immune to hangup signals while
       in the background.  There is a built-in command which provides immunity from terminate, but it does not redirect output to nohup.out.

       The  command  is built into with a slightly different syntax than described here.  The form ``nice +10'' nices to positive nice, and ``nice
       -10'' can be used by the superuser to give a process more of the processor.

Diagnostics
       The command returns the exit status of the subject command.

Files
       nohup.out standard output and standard error file under nohup

See Also
       csh(1), getpriority(2), renice(8)

																	   nice(1)
All times are GMT -4. The time now is 06:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy