the status which a process stop in mutex lock?

1.when a process catch a SIGSTOP.and at this time,it has enter in mutex
lock.
whether other process can’t not enter the
mutex to deal with data.
2.And the same with sem_post and sem_wait.
3.And the same with message queue?

zhz_zhang <zhz_zhang26@sina.com> wrote:

1.when a process catch a SIGSTOP.and at this time,it has enter in mutex
lock.
whether other process can’t not enter the
mutex to deal with data.

Yes.

2.And the same with sem_post and sem_wait.

Yes.

But, doing this to a process that may be locking shared resources
is not a friendly thing to do. Yes, it might happen if you’re
debugging a process, but you don’t really want to do this on a
live/running system.

3.And the same with message queue?

No. Message queues don’t have any locking associated with them.

Of course, if you SIGSTP the mqueue process, it won’t be able to
handle any of the queueing, so that would stop things.

But, otherwise, queues are just put/get entry type stuff, and nobody
“owns” the queue, so stopping a particular process will not prevent
other people from reading from the queue, or writing to the queue.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.