Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9149649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:30:21+00:00 2026-06-17T11:30:21+00:00

What happens when a process reads an IPC message with msgrcv ? Why I

  • 0

What happens when a process reads an IPC message with msgrcv?

Why I can’t read a message with the same mtype more than once?

Code for the structure being used:

struct msgbuff{
    long mtype;
    char mtext[150];   
};
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T11:30:22+00:00Added an answer on June 17, 2026 at 11:30 am

    A message can only be read once. This is how the msgrcv manpage describes its function:

    The msgrcv() system call removes a message from the queue specified by msqid and places it in the buffer pointed to by msgp.

    There is no way to peek at the queue. If you need that you could pop an item from the queue with msgrcv() and then add it again using msgsnd(). There is a risk that will fail (queue full, out of memory, etc.) so it is not foolproof.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I hope this is programming-related enough. What exactly happens during the shutdown process of
What happens in the following code? Does the synchronization work? This is an interview
I am trying to read some objects from a file. The code works fine
Fundamentally, this question is about: Can the same DB connection be used across multiple
I've read in a few places that PhoneApp (com.android.phone.PhoneApp.java), is a persistent process which
We have a simple console app that uses EF 4 to process data; read
In Perl, I'm trying to read a file line by line and process each
In Linux, what happens to the state of a process when it needs to
I have read in several places that for-in loops are slower than looping over
Background: I've got a large existing process (it happens to be on AIX, so

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.