Sponsored Content
Top Forums Shell Programming and Scripting Usage of NOHUP - How to keep the child process running even if I close the Server connection Post 302419678 by adelsin on Saturday 8th of May 2010 12:32:36 AM
Old 05-08-2010
What happens if....

I'm not to sure if I fully understand your situation, but have you tried running the scripts as another user?

Like
Code:
 sudo -u newuser nohup my.script &

?

I would also say try to su - in and run the script, but I suppose when you exit that shell as well, you would have a similar problem?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to export a variable from a child process running in background to the parent

Hi All, I have a script which calls a child script with a parameter to be run in the background . childscript.ksh $a & Can any one suggest me how do i export a variable from the child script to parent script? Note that the child script is in background If the child script is in... (3 Replies)
Discussion started by: aixjadoo
3 Replies

2. Shell Programming and Scripting

script to monitor process running on server and posting a mail if any process is dead

Hello all, I would be happy if any one could help me with a shell script that would determine all the processes running on a Unix server and post a mail if any of the process is not running or aborted. Thanks in advance Regards, pradeep kulkarni. :mad: (13 Replies)
Discussion started by: pradeepmacha
13 Replies

3. Programming

when parent process close, how to close the child?

can someone provide an example, where if the parent process quits for any reason, then the child process will also close? (3 Replies)
Discussion started by: omega666
3 Replies

4. Shell Programming and Scripting

forking a child process and kill its parent to show that child process has init() as its parent

Hi everyone i am very new to linux , working on bash shell. I am trying to solve the given problem 1. Create a process and then create children using fork 2. Check the Status of the application for successful running. 3. Kill all the process(threads) except parent and first child... (2 Replies)
Discussion started by: vizz_k
2 Replies

5. Solaris

Ssh to Solaris 10 server - close connection

Can ssh to server. Asks for password. Then seems to time out and close the connection. Any ideas? ---------- Post updated at 09:30 AM ---------- Previous update was at 07:51 AM ---------- Here is output from ssh -vvv -l user <IPaddress> debug3: packet_send2: adding 64 (len 59 padlen 5... (4 Replies)
Discussion started by: psychocandy
4 Replies

6. Shell Programming and Scripting

How to pause process running under nohup?

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

7. 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

8. Shell Programming and Scripting

Running nohup command on remote server

I am having an issue in running a nohup command in a remote linux box from a linux box. Here are the details. Linux Machine 1: I have a script which starts a services and dumps the output into a log file. nohup sh weblogic.sh >> /home/log.out & I have placed the entire command in a... (2 Replies)
Discussion started by: accessbalaji
2 Replies

9. UNIX for Advanced & Expert Users

Issue with tracking successful completion of Child process running in background

Hello All, I am using Linux. I have two scripts: inner_script.ksh main_wrapper_calling_inner.ksh Below is the code snippet of the main_wrapper_calling_inner.ksh: #!/bin/ksh ppids=() ---> Main array for process ids. fppids=() ---> array to capture failed process ids. pcnt=0 --->... (5 Replies)
Discussion started by: dmukherjee
5 Replies

10. Shell Programming and Scripting

Nohup not give expected output. Non-stop running process

Hello, I am trying to make a bash script, I tested nohup but it did not help me. My code is: ffmpeg -i $input_url -c:v copy -c:a copy -listen 1 -f mpegts http://localhost:port/live/test When I open it in VLC, it starts feeding my screen and I see bitrate values. When I stop watching it,... (4 Replies)
Discussion started by: baris35
4 Replies
NOHUP(1)						    BSD General Commands Manual 						  NOHUP(1)

NAME
nohup -- invoke a command immune to hangups SYNOPSIS
nohup utility [arg ...] DESCRIPTION
The nohup command allows the specified utility to be protected from termination if the user should become logged out (for example, due to a modem line or TCP/IP connection being dropped). To do this, nohup sets the SIGHUP signal(3) (``terminal line hangup'') to be ignored, then executes utility along with any arguments. If the standard output is a terminal, the standard output is appended to the file nohup.out in the current directory. If standard error is a terminal, it is directed to the same place as the standard output. If the output file nohup.out cannot be created in the current directory, nohup attempts to create the file in the user's home directory. If the file nohup.out cannot be created, either in the current directory or the user's home directory, nohup will exit without invoking utility, with an exit value as described below. ENVIRONMENT
The following variable is used by nohup. HOME User's home directory. EXIT STATUS
The nohup utility exits with one of the following values: 126 The utility was found but could not be invoked. 127 The utility could not be found or an error occurred in nohup. Otherwise, the exit status of nohup will be that of utility. SEE ALSO
signal(3) STANDARDS
The nohup command is expected to be IEEE Std 1003.2 (``POSIX.2'') compatible. BSD
July 15, 2005 BSD
All times are GMT -4. The time now is 09:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy