Find the answer to your Linux question:
Results 1 to 3 of 3
Hello All, I have two running processes A and B. After some time, process B stops (SIGSTOP) the process A. Now, process B wants to determine that - " when ...
  1. #1
    Just Joined!
    Join Date
    Mar 2009
    Posts
    2

    How to a detect process is running in system call or not?



    Hello All,

    I have two running processes A and B. After some time, process B stops (SIGSTOP) the process A.

    Now, process B wants to determine that - " when the process A was stopped (SIGSTOP), was it (process A) executing some system call or not? "

    And if the process A was in system call, then in which system call was it executing?

    Remember : process B is working via kernel-module.

    Thank you and wishing your reply...

    from,
    Nisarg

  2. #2
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,568

    Exclamation

    Just guessing here,may be generate a core dump of process and find whether the process was in kernel mode or not using the dump.
    another guess,time command provides user time and system time --- is possible to retrieve something from there?

    no more guesses....I hope someone comes with better reply than this
    - Lakshmipathi.G
    -------------------
    FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
    First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -------------------

  3. #3
    Just Joined!
    Join Date
    May 2008
    Posts
    55
    get the stack trace of the process A
    and scan it.
    you can see whether process was in kernel mode :
    and if it was then get the symbol (of course which was must be telling which system call you were in)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •