How to check the signal handler in Linux

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
1
down vote

favorite












I have read this discussion which discuss about how to check the signal actions of each process:
How can I check what signals a process is listening to?



However, I want to use C/C++, Python or other ways to get the userspace of the signal handler name of each process. Just like the psig in Solaris:
What is the meaning of every column when executing psig command?



Would it be possible to do that in Linux?







share|improve this question



























    up vote
    1
    down vote

    favorite












    I have read this discussion which discuss about how to check the signal actions of each process:
    How can I check what signals a process is listening to?



    However, I want to use C/C++, Python or other ways to get the userspace of the signal handler name of each process. Just like the psig in Solaris:
    What is the meaning of every column when executing psig command?



    Would it be possible to do that in Linux?







    share|improve this question























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I have read this discussion which discuss about how to check the signal actions of each process:
      How can I check what signals a process is listening to?



      However, I want to use C/C++, Python or other ways to get the userspace of the signal handler name of each process. Just like the psig in Solaris:
      What is the meaning of every column when executing psig command?



      Would it be possible to do that in Linux?







      share|improve this question













      I have read this discussion which discuss about how to check the signal actions of each process:
      How can I check what signals a process is listening to?



      However, I want to use C/C++, Python or other ways to get the userspace of the signal handler name of each process. Just like the psig in Solaris:
      What is the meaning of every column when executing psig command?



      Would it be possible to do that in Linux?









      share|improve this question












      share|improve this question




      share|improve this question








      edited Jul 27 at 10:12
























      asked Jul 27 at 7:29









      user2365346

      63




      63




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote













          The signal function returns a pointer to the existing handler, if any. You can set a signal to a known value, get the existing handler's address and restore it.






          share|improve this answer





















          • I just want to know how to get the handler's name, such as termsig_sighandler in this discussion: unix.stackexchange.com/questions/163573/…
            – user2365346
            Jul 30 at 0:34










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f458768%2fhow-to-check-the-signal-handler-in-linux%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote













          The signal function returns a pointer to the existing handler, if any. You can set a signal to a known value, get the existing handler's address and restore it.






          share|improve this answer





















          • I just want to know how to get the handler's name, such as termsig_sighandler in this discussion: unix.stackexchange.com/questions/163573/…
            – user2365346
            Jul 30 at 0:34














          up vote
          1
          down vote













          The signal function returns a pointer to the existing handler, if any. You can set a signal to a known value, get the existing handler's address and restore it.






          share|improve this answer





















          • I just want to know how to get the handler's name, such as termsig_sighandler in this discussion: unix.stackexchange.com/questions/163573/…
            – user2365346
            Jul 30 at 0:34












          up vote
          1
          down vote










          up vote
          1
          down vote









          The signal function returns a pointer to the existing handler, if any. You can set a signal to a known value, get the existing handler's address and restore it.






          share|improve this answer













          The signal function returns a pointer to the existing handler, if any. You can set a signal to a known value, get the existing handler's address and restore it.







          share|improve this answer













          share|improve this answer



          share|improve this answer











          answered Jul 27 at 9:26









          Thomas Dickey

          49k583153




          49k583153











          • I just want to know how to get the handler's name, such as termsig_sighandler in this discussion: unix.stackexchange.com/questions/163573/…
            – user2365346
            Jul 30 at 0:34
















          • I just want to know how to get the handler's name, such as termsig_sighandler in this discussion: unix.stackexchange.com/questions/163573/…
            – user2365346
            Jul 30 at 0:34















          I just want to know how to get the handler's name, such as termsig_sighandler in this discussion: unix.stackexchange.com/questions/163573/…
          – user2365346
          Jul 30 at 0:34




          I just want to know how to get the handler's name, such as termsig_sighandler in this discussion: unix.stackexchange.com/questions/163573/…
          – user2365346
          Jul 30 at 0:34












           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f458768%2fhow-to-check-the-signal-handler-in-linux%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay