ipcrm.c (87285) | ipcrm.c (92920) |
---|---|
1/* 2 * Copyright (c) 1994 Adam Glass 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 * SUCH DAMAGE. 30 */ 31 32#ifndef lint 33static const char rcsid[] = | 1/* 2 * Copyright (c) 1994 Adam Glass 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 * SUCH DAMAGE. 30 */ 31 32#ifndef lint 33static const char rcsid[] = |
34 "$FreeBSD: head/usr.bin/ipcrm/ipcrm.c 87285 2001-12-03 21:00:33Z dwmalone $"; | 34 "$FreeBSD: head/usr.bin/ipcrm/ipcrm.c 92920 2002-03-22 01:22:50Z imp $"; |
35#endif /* not lint */ 36 37#include <ctype.h> 38#include <err.h> 39#include <signal.h> 40#include <stdio.h> 41#include <stdlib.h> 42#include <unistd.h> --- 4 unchanged lines hidden (view full) --- 47#include <sys/shm.h> 48 49#define IPC_TO_STR(x) (x == 'Q' ? "msq" : (x == 'M' ? "shm" : "sem")) 50#define IPC_TO_STRING(x) (x == 'Q' ? "message queue" : \ 51 (x == 'M' ? "shared memory segment" : "semaphore")) 52 53int signaled; 54 | 35#endif /* not lint */ 36 37#include <ctype.h> 38#include <err.h> 39#include <signal.h> 40#include <stdio.h> 41#include <stdlib.h> 42#include <unistd.h> --- 4 unchanged lines hidden (view full) --- 47#include <sys/shm.h> 48 49#define IPC_TO_STR(x) (x == 'Q' ? "msq" : (x == 'M' ? "shm" : "sem")) 50#define IPC_TO_STRING(x) (x == 'Q' ? "message queue" : \ 51 (x == 'M' ? "shared memory segment" : "semaphore")) 52 53int signaled; 54 |
55void usage __P((void)); 56int msgrm __P((key_t, int)); 57int shmrm __P((key_t, int)); 58int semrm __P((key_t, int)); 59void not_configured __P((int)); | 55void usage(void); 56int msgrm(key_t, int); 57int shmrm(key_t, int); 58int semrm(key_t, int); 59void not_configured(int); |
60 61void usage() 62{ 63 fprintf(stderr, "%s\n%s\n", 64 "usage: ipcrm [-q msqid] [-m shmid] [-s semid]", 65 " [-Q msgkey] [-M shmkey] [-S semkey] ..."); 66 exit(1); 67} --- 116 unchanged lines hidden --- | 60 61void usage() 62{ 63 fprintf(stderr, "%s\n%s\n", 64 "usage: ipcrm [-q msqid] [-m shmid] [-s semid]", 65 " [-Q msgkey] [-M shmkey] [-S semkey] ..."); 66 exit(1); 67} --- 116 unchanged lines hidden --- |