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
C

Avatar of undefined
Last Comment
rintsp

8/22/2022 - Mon
stefan73

Hi rintsp,
Redirect the output and use nohup:

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

Cheers,
Stefan
ASKER CERTIFIED SOLUTION
sunnycoder

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
rintsp

Oops, sorry I should have closed this along time back, sunnycoder is the correct answer and points sorted!
Your help has saved me hundreds of hours of internet surfing.
fblack61