LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-05-2015, 07:37 AM   #1
Allexandra05
LQ Newbie
 
Registered: Feb 2015
Posts: 8

Rep: Reputation: Disabled
process waiting for a semaphore


If I have a process that is in sleep state and i can see in ps' column WCHAN that is waiting to obtain a semaphore, is there any way to find the adress of that semaphore?
 
Old 03-05-2015, 08:02 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
No not unless you're within that code's execution path and know the symbol name.
 
Old 03-06-2015, 12:38 AM   #3
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 676

Rep: Reputation: 137Reputation: 137
Quote:
Originally Posted by Allexandra05 View Post
If I have a process that is in sleep state and i can see in ps' column WCHAN that is waiting to obtain a semaphore, is there any way to find the adress of that semaphore?
Code:
sudo strace -p <your_process_pid>
will gave you some info, but what will you do with this semaphore address?
 
Old 03-06-2015, 06:32 AM   #4
Allexandra05
LQ Newbie
 
Registered: Feb 2015
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Valery Reznic View Post
Code:
sudo strace -p <your_process_pid>
will gave you some info, but what will you do with this semaphore address?
I need a tools for linux that will provide the same information as QNX's pidin, more about the state and blocked columns: http://www.qnx.com/developers/docs/6...n.html#Blocked.

In pidin's output, when the state is SEM(semaphore-blocked) in the blocked column will be the adress of the semaphore.
I want, if it's possible, to somehow combine this information with ps.
 
  


Reply

Tags
ipc, semaphore



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Signal handling while waiting on process h_dog Programming 1 04-21-2013 11:19 PM
Howto avoid waiting for a process to finish in a script anil3 Linux - General 3 12-07-2007 05:35 AM
kill a waiting process using shellscript ranmahs Linux - General 5 12-07-2007 03:56 AM
My browser, all day today: 'waiting for linuxquestions.org...' ..waiting.. waiting .. GrapefruiTgirl LQ Suggestions & Feedback 18 05-25-2007 05:35 AM
waiting for a child process to finish execution in C cynthia_thomas Programming 2 05-26-2006 03:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration