Link to home
Start Free TrialLog in
Avatar of rintsp
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
Avatar of stefan73
stefan73
Flag of Germany image

Hi rintsp,
Redirect the output and use nohup:

nohup your_script > /dev/null 2>&1 &

Cheers,
Stefan
ASKER CERTIFIED SOLUTION
Avatar of sunnycoder
sunnycoder
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rintsp
rintsp

ASKER

Oops, sorry I should have closed this along time back, sunnycoder is the correct answer and points sorted!