echo "Running process one:"
nohup ./ProcessOne >> ${log_file} &
echo "Running process two:"
nohup ./ProcessTwo >> ${log_file} &
echo "The process are runnig. Bye"
Same problem. When i say crash, i mean the first process "stop" when the second process is sending to background.
---------- Post updated at 03:57 PM ---------- Previous update was at 03:41 PM ----------
Look this, the complete script:
echo "Launching first process.."
ProcessOne > /dev/null 2> /dev/null &
jobs -l
#I need time to the process one do some things, 20 seconds is a good time
echo "Sleeping 20 seconds"
sleep 20
echo "Launching second process.. "
ProcessTwo /dev/null 2> /dev/null &
jobs -l
echo "Finished."
The processTwo comunicates with processOne. But this is the output console
Exaccly. P1 and P2 are not an interactive program. They comunicates with messages with TCP, but i think it is not the question. The problem is when P2 starts, it say "connection time out" becouse P1 doesnt respond.
I repeat, if i do manually with two terminals, the process P1 and P2 work correctly.
Ok, Post code for these two scripts that you run in background that should talk to each other because one or the other does not like running in the background.