When the 550 students at a private school in Virginia Beach recently returned to class, they walked into classrooms newly monitored by gunshot-detection technology. Acoustic sensors tucked high on walls listened for the distinct sound of gunfire, able to pinpoint its location and alert authorities. The technology also greeted students heading back to schools in Newark, Calif., and Reynoldsburg, Ohio.