NetworkBlockDevice / nbd

Network Block Device
GNU General Public License v2.0
459 stars 120 forks source link

Make sure nbd-client child exits if parent exited #34

Closed cheese closed 8 years ago

cheese commented 8 years ago

In the main loop of nbd-client child, check_conn() will not return 0 when nbd disconnected and parent exited during this loop. So the child has to explicitly check parent identity and exit if parent exited.

The issue is easily reproduced by an immediate disconnect after a connect:

nbd-client -N .... /dev/nbd0 && nbd-client -d /dev/nbd0

Then an nbd-client process may remain looping.