If I run a program with an infinite loop with
nohup, will the program run indefinitely (until the machine is reset or until I manually terminate it)?
Nohup sets the default behavior of the HANGUP signal, which might get overriden by the application. Other signals from other processes with permission (root or same user) or bad behavior (seg faults, bus errors) can also cause program termination. Resource limitations (ulimit) can also end the program.
Barring these, your infinite loop might well run a very long time.
Following are the two important line from nohup's source code.
So until your application calls something like
In the normal circumstances it will continue to run until you restart machine or kill it yourself.