Quote:
Originally Posted by salous
It won't return because your program is stuck in a infinite loop.
|
Yes, but servers also run in infinite loop, waiting for something, like incoming messages, waiting for other processes? How are those applications able to run forever and still able to get prompt back?
example:
# ./network restart
Shutting down interface eth0: [OK]
Shutting down loopback interface: [OK]
Bringing up loopback interface: [OK]
#
I also tried another short program that spawns a child process, I can then issue signal 19 to stop the child process and restart with signal 18.
I still do not see [OK] message and prompt.
Thanks.