ClarkuCSCI / pydiode

Transfer data through a unidirectional network (i.e., a data diode)
MIT License
3 stars 1 forks source link

Terminate stuck pipelines #8

Closed peterstory closed 6 months ago

peterstory commented 7 months ago

In the receiver pipeline, pydiode listens on the network and sends data to tar. Suppose you start sending a large file, then cancel sending, then restart sending. The receiver's tar will exit before its pydiode, presumably because tar received the amount of data it expected. Since tar comes later in the pipeline, tar won't consume pydiode's STDOUT, which will prevent pydiode from exiting.

The solution is to detect cases where processes later in the pipeline exit before processes earlier in the pipeline. If this happens, all the processes in the pipeline should be terminated.

For #5