Check /proc/net/tcp in an endless loop to detect opening of a port.