Link to home
Start Free TrialLog in
Avatar of pavanbh
pavanbh

asked on

Using fork from within a shell script.

Hi All,
I have to use the fork command from within a shell script. I am not sure how to do this? Will I need to include something? Please help.
Thanks,
Pavan.
Avatar of brettmjohnson
brettmjohnson
Flag of United States of America image

There really isn't a fork command that you would use from within a shell script.
fork() is a system call used by compiled programs to create another process.
It is trivially easy to create new processes within a shell script - in fact unix shells
are nothing more than environments for running many processes, and linking
them together into working solutions.

Avatar of pavanbh
pavanbh

ASKER

So is there any other way I can kickoff another program from the current one, without blocking it? More specifics: I need to kickoff a perl program from within a shell script and have them both running...Is there a way to accomplish this?
Thanks.
ASKER CERTIFIED SOLUTION
Avatar of brettmjohnson
brettmjohnson
Flag of United States of America 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 pavanbh

ASKER

Thanks brettmjohnson. That did the trick. Should have thought of that before....alas!!! a newbie.