Sorry, `int type` should be `long type`. The `msgtyp` parameter of `msgrcv` is `long`.