Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

the following short bash program described how to execute the func1 by process ( func1 & )

func1 is function that do some tests and verification on Linux machines

And this program run after reboot from /etc/rc3.d

I want to ask if it possible to create from func1 a process in spite this bash script will ended immediately after process creation? And if this action is illegal?

and if this not illegal please advice about other option ?

I ask this question because after reboot process not created from func1 And I don't know why maybe because this process created before program ended ?

remark – if I run this bash script from console ( without reboot ) then process created without problems

bash script program:


 func1 ()
      do something 
 func1 &
share|improve this question
up vote 1 down vote accepted

There is no general reason why what you are trying to do won't work. You will have to just knuckle down and start debugging the script. Try adding some debug messages to your func1() and capture the output like so

func1 &>/tmp/func1.out &

If that doesn't provide any information then expand the scope of your messages and redirects.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.