rintsp
asked on
Submitting shell script in background.
Hi
I have an application that requires to execute a shell script in the background.
For example, the user will select print report, which is a seperate process and is run from a K Shell script. I need a way of running that shell script in the background, without the screen waiting for the process to complete. i.e. fire and forget. The calling screen will supply the full path of the shell script.
Is there a simple way of acheiving this in C on HP-UX and on Windows?
Pete
I have an application that requires to execute a shell script in the background.
For example, the user will select print report, which is a seperate process and is run from a K Shell script. I need a way of running that shell script in the background, without the screen waiting for the process to complete. i.e. fire and forget. The calling screen will supply the full path of the shell script.
Is there a simple way of acheiving this in C on HP-UX and on Windows?
Pete
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Oops, sorry I should have closed this along time back, sunnycoder is the correct answer and points sorted!
Redirect the output and use nohup:
nohup your_script > /dev/null 2>&1 &
Cheers,
Stefan