I try to create message queue on linux subsystem in Windows 10.
When I try to create message queue using this function:
queueId = msgget(*key, IPC_CREAT | IPC_EXCL | 0660);
if (queueId == -1)
{
if (errno == EEXIST)
{
queueId = msgget(*key, IPC_CREAT | 0660);
printf("Messege queue already exists, access acquired
");
return;
}
else
{
printf("Couldn't create message queue. Process ended with error: %d
", errno);
exit(EXIT_FAILURE);
}
}
else
{
printf("Message queue has been created with id: %d
", queueId);
}
I receive an error number 38 which is ENAMETOOLONG. What can I do in this case?
question from:
https://stackoverflow.com/questions/65849444/cant-create-message-queue-in-linux-subsystem-on-windows 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…