Move shmctl(2) + IPC_RMID to init phase
Move shmctl(2) + IPC_RMID to init phase

When nginx running with master/worker processes and their UID are not same
(e.g master as root / workers as nobody), shmctl(2) + IPC_RMID in
mrb_mutex_data_free of a worker returns EINVAL.

That's because worker processes are not the creator nor the owner of shared
memory segments, and not privileged user.

Please read man 2 shmctl.

matsumoto-r/mruby-mutex,matsumoto-r/mruby-mutex