summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>1999-09-23 09:57:45 +0000
committermarcel <marcel@FreeBSD.org>1999-09-23 09:57:45 +0000
commitdcdfd6fd8e93f7d7b55f04fc2936f12429f4ba22 (patch)
tree117004cfd21103f3ac34d911d2f030657d7e929b /sys
parent52ab2170f360b6ba294006092ce416c13cf9276b (diff)
downloadFreeBSD-src-dcdfd6fd8e93f7d7b55f04fc2936f12429f4ba22.zip
FreeBSD-src-dcdfd6fd8e93f7d7b55f04fc2936f12429f4ba22.tar.gz
Linux doesn't complain if you remove a msg queue that doesn't exist
(given the proper permissions).
Diffstat (limited to 'sys')
-rw-r--r--sys/compat/linux/linux_ipc.c4
-rw-r--r--sys/i386/linux/linux_ipc.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/sys/compat/linux/linux_ipc.c b/sys/compat/linux/linux_ipc.c
index 5efee53..0428702 100644
--- a/sys/compat/linux/linux_ipc.c
+++ b/sys/compat/linux/linux_ipc.c
@@ -334,11 +334,13 @@ linux_msgctl(struct proc *p, struct linux_ipc_args *args)
int cmd;
struct msqid_ds *buf;
} */ bsd_args;
+ int error;
bsd_args.msqid = args->arg1;
bsd_args.cmd = args->arg2;
bsd_args.buf = (struct msqid_ds *)args->ptr;
- return msgctl(p, &bsd_args);
+ error = msgctl(p, &bsd_args);
+ return ((args->arg2 == LINUX_IPC_RMID && error == EINVAL) ? 0 : error);
}
static int
diff --git a/sys/i386/linux/linux_ipc.c b/sys/i386/linux/linux_ipc.c
index 5efee53..0428702 100644
--- a/sys/i386/linux/linux_ipc.c
+++ b/sys/i386/linux/linux_ipc.c
@@ -334,11 +334,13 @@ linux_msgctl(struct proc *p, struct linux_ipc_args *args)
int cmd;
struct msqid_ds *buf;
} */ bsd_args;
+ int error;
bsd_args.msqid = args->arg1;
bsd_args.cmd = args->arg2;
bsd_args.buf = (struct msqid_ds *)args->ptr;
- return msgctl(p, &bsd_args);
+ error = msgctl(p, &bsd_args);
+ return ((args->arg2 == LINUX_IPC_RMID && error == EINVAL) ? 0 : error);
}
static int
OpenPOWER on IntegriCloud