/*
- * Copyright (C) 1996-2016 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
if (rmsgid < 0) {
perror("msgget");
- return 1;
+ exit(EXIT_FAILURE);
}
key = atoi(argv[2]);
if (smsgid < 0) {
perror("msgget");
- return 1;
+ exit(EXIT_FAILURE);
}
key = atoi(argv[3]);
if (shmid < 0) {
perror("shmget");
- return 1;
+ exit(EXIT_FAILURE);
}
shmbuf = (char *)shmat(shmid, NULL, 0);
if (shmbuf == (void *) -1) {
perror("shmat");
- return 1;
+ exit(EXIT_FAILURE);
}
hash = hash_create(fsCmp, 1 << 4, fsHash);
assert(hash);
if (fcntl(0, F_SETFL, SQUID_NONBLOCK) < 0) {
perror(xstrerr(errno));
- return 1;
+ exit(EXIT_FAILURE);
}
memset(&sa, '\0', sizeof(sa));
sa.sa_handler = alarm_handler;
if (shmctl(shmid, IPC_RMID, 0) < 0)
perror("shmctl IPC_RMID");
- return 0;
+ return EXIT_SUCCESS;
}