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

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
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!
C
C

C is a general-purpose, imperative computer programming language, supporting structured programming, lexical variable scope and recursion, while a static type system prevents many unintended operations. By design, C provides constructs that map efficiently to typical machine instructions, so it has found lasting use in applications that had formerly been coded in assembly language, including operating systems as well as various application software for computers ranging from supercomputers to embedded systems. It is distinct from C++ (which has its roots in C) and C#, and many later languages have borrowed directly or indirectly from C.

23K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo