From: Alex Rousskov Date: Fri, 21 Oct 2011 21:59:16 +0000 (-0600) Subject: Made fatal shm_open() errors more detailed to triage failing tests/testRock. X-Git-Tag: BumpSslServerFirst.take01~91 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=77915f065e93d6218259a8703a2fa912e37f95a6;p=thirdparty%2Fsquid.git Made fatal shm_open() errors more detailed to triage failing tests/testRock. --- diff --git a/src/ipc/mem/Segment.cc b/src/ipc/mem/Segment.cc index bb4b543f86..e897ced9f4 100644 --- a/src/ipc/mem/Segment.cc +++ b/src/ipc/mem/Segment.cc @@ -66,7 +66,8 @@ Ipc::Mem::Segment::create(const off_t aSize) S_IRUSR | S_IWUSR); if (theFD < 0) { debugs(54, 5, HERE << "shm_open " << theName << ": " << xstrerror()); - fatal("Ipc::Mem::Segment::create failed to shm_open"); + fatalf("Ipc::Mem::Segment::create failed to shm_open(%s): %s\n", + theName.termedBuf(), xstrerror()); } if (ftruncate(theFD, aSize)) { @@ -93,9 +94,8 @@ Ipc::Mem::Segment::open() theFD = shm_open(theName.termedBuf(), O_RDWR, 0); if (theFD < 0) { debugs(54, 5, HERE << "shm_open " << theName << ": " << xstrerror()); - String s = "Ipc::Mem::Segment::open failed to shm_open "; - s.append(theName); - fatal(s.termedBuf()); + fatalf("Ipc::Mem::Segment::open failed to shm_open(%s): %s\n", + theName.termedBuf(), xstrerror()); } theSize = statSize("Ipc::Mem::Segment::open");