Definitions of close shave:

  • noun:   something achieved (or escaped) by a narrow margin