A 170-line multithreaded barber-shop program shares waiting chairs and a few tools between barbers. It has several bugs — the last one makes shutdown hang with three customers stuck. Find and fix them all.
A 170-line multithreaded barber-shop program shares waiting chairs and a few tools between barbers. It has several bugs — the last one makes shutdown hang with three customers stuck. Find and fix them all.
Opens with the full question.