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 but no idea about background.
Thanks Robin for the reply.
can we map this signal generation to a hot key some how ? i need a convenient way of doing this .
where there are multiple parallel processes running under make ,i need to send signal all those processes and is not
convenient to me. i need a way similar to cntrl+z which should collect all the pids info under nohup and
send SIGSTOP in one go.
When you put something into the background (with or without nohup) you effectively disconnect it from the terminal. You could bring it back under terminal control by bringing it back into the foreground again.
When you start a process in the background from the command line, you will see the following sort of thing on the screen:-
The number in square brackets is the job id and the number after is the process id. You can bring it back to the foreground with the command:-
... or ...
So, use a percentage % marker to show it is the job id, or just use the process id. You will then be able to suspend it with a CNTL-Z as usual.
To restart it in the foreground, it is just as before. You can restart it in the background as either
... or ...
I'm not sure about programming a keystroke to fire of a mass suspend. You might be able to do that with trap on signal 18, but then you disable CNTL-Z from your running shell.
I'm not sure if this is going to be easy to acheive. Could you not code up a function for the above suggestion, something like:-
If you either include this in your .profile or have in in a script you can source in like this . newfunc, then from the command line, you would be able to do the following:-
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)
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)
Hi,
I am running nohup cp & in a shell script.
How do I get a timestamp so I can get a timing of how long the copy took?
Roughly, the script does something like below:
date
nohup cp -rp /files/source /files/target &
date
I am mainly wanting to know how long it took for the... (9 Replies)
Hi,
I am running the below script. When i run the script normally it executes fine but when i run the same script using nohup it throws an error as getStatus.sh: syntax error at line 3: `(' unexpected . Can you let me know why it is so?
while
do
. $(dirname $0)/include.sh
cd... (2 Replies)
Hi,
I'm trying to run database restore script with the nohup command as it will run for long hours since if I run it normally, the putty session will become inactive and the restore gets terminated. The command I use is
nohup db2 -tvf FBR_NODE0000.scr -z FBR_NODE0000.log &
But the problem is... (2 Replies)
Hi. !
When I use the 'NOHUP' along with the '&', the process will be running in the background. Even when I attempt to close (Meaning 'EXIT') the session (say PUTTY in this case), it wont exit unless the process is completed.
But, say when I forcefully terminate the session (SHUT DOWN the... (2 Replies)
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)
I guess I posted in wrong forum before. How do I pause another process and then restart it on linux? The other process doesn't listen for anything.
Thanks for any help you can offer.
Dane :confused: (1 Reply)
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)