[LTP] [PATCH v2 01/10] Rewrite mesgq_nstest.c using new LTP API
Cyril Hrubis
chrubis@suse.cz
Tue Mar 15 13:38:30 CET 2022
Hi!
> > And technically it would be best to call the msgget() with IPC_PRIVATE
> > and then get the key by msgctl() IPC_STAT.
> According with documentation and examples, msgget() is mostly used with
> IPC_CREAT . What's the advantage of using IPC_PRIVATE in this case?
If you pass IPC_PRIVATE instead of the hardcoded key kernel will pick an
unused key for you, that's all.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list