They solved this a LONG time ago!
"In the UK, the Regulation of Railways Act 1889 introduced a series of requirements on matters such as the implementation of interlocked block signalling and other safety measures as a direct result of the Armagh rail disaster in that year."