Thanks for the reply. It is getting strange. In order to verify that it is actually getting executed, I put "sleep 300" before the second program. It did getting executed. After it gets started, I "ps -A" and found that the first program is running as a background program and the shell for the second program is running as well. Or actually, "sleep" is running. However, after "sleep" was finished, the second one kind of failed to run as a background program.
Again, the first one is socket server and the second is a client based on that.
Interestingly, I copy the line in the second shell and run it manually as background, it works. It seems that the system doesn't want to run it at start up. The command I was using is like:
"/absolute/location/second > /dev/null &"
Any idea about what is going wrong? Thanks.
Originally Posted by chingadero
This may not be the most elegant method, but I had the same situation.
I added "sleep 15" to the beginning of my start function in /etc/init.d/SecondScript so that it would wait 15 seconds before starting up.