Skip to content

Commit 5c31739

Browse files
committed
msgctl: return error if cmd != IPC_RMID
1 parent aa64281 commit 5c31739

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

msgctl.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
package ipc
22

33
import (
4+
"fmt"
45
"syscall"
56
)
67

78
// Msgctl calls the msgctl() syscall.
89
// FIXME: we are not passing the buf argument, see msgctl(2).
910
func Msgctl(qid uint, cmd int) error {
11+
if cmd != IPC_RMID {
12+
return fmt.Errorf("only IPC_RMID is supported at the moment")
13+
}
1014
var buf uintptr = 0
1115
_, _, err := syscall.Syscall(syscall.SYS_MSGCTL, uintptr(qid), buf, 0)
1216
if err != 0 {

0 commit comments

Comments
 (0)