How to get the pid of a process that send a signal to my program

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • hugo.arregui@gmail.com

    How to get the pid of a process that send a signal to my program

    Hi!

    well, i have written a signal handler on my code, but i want to know
    the pid of the process that send the signal. It's possible?

    (I'm working on linux)

    Thanks you.
  • viza

    #2
    Re: How to get the pid of a process that send a signal to my program

    On Jun 11, 1:34 pm, "hugo.arre...@g mail.com" <hugo.arre...@g mail.com>
    wrote:
    >
    well, i have written a signal handler on my code, but i want to know
    the pid of the process that send the signal. It's possible?
    RTFM:
    man sigaction

    Comment

    • hugo.arregui@gmail.com

      #3
      Re: How to get the pid of a process that send a signal to my program

      ok, thanks you viza
      On Jun 11, 9:48 am, viza <tom.v...@gmail .comwrote:
      >
      RTFM:
      man sigaction

      Comment

      • Keith Thompson

        #4
        Re: How to get the pid of a process that send a signal to my program

        "hugo.arregui@g mail.com" <hugo.arregui@g mail.comwrites:
        well, i have written a signal handler on my code, but i want to know
        the pid of the process that send the signal. It's possible?
        >
        (I'm working on linux)
        Ask in comp.unix.progr ammer.

        --
        Keith Thompson (The_Other_Keit h) kst-u@mib.org <http://www.ghoti.net/~kst>
        Nokia
        "We must do something. This is something. Therefore, we must do this."
        -- Antony Jay and Jonathan Lynn, "Yes Minister"

        Comment

        • hugo.arregui@gmail.com

          #5
          Re: How to get the pid of a process that send a signal to my program

          Thanks you Keith, but Veza answer my question, i didn't read sigaction
          parameters.

          My fault xD.

          Keith Thompson (The_Other_Keit h) ks...@mib.org <http://www.ghoti.net/~kst>
          Nokia
          "We must do something. This is something. Therefore, we must do this."
          -- Antony Jay and Jonathan Lynn, "Yes Minister"

          Comment

          • CBFalconer

            #6
            Re: How to get the pid of a process that send a signal to my program

            "hugo.arregui@g mail.com" wrote:
            >
            Thanks you Keith, but Veza answer my question, i didn't read
            sigaction parameters.
            You still don't know if the answer is correct, and even if it was
            Veza had no business answering it here, where it is off topic.

            Please do not top-post. Your answer belongs after (or intermixed
            with) the quoted material to which you reply, after snipping all
            irrelevant material. See the following links:

            <http://www.catb.org/~esr/faqs/smart-questions.html>
            <http://www.caliburn.nl/topposting.html >
            <http://www.netmeister. org/news/learn2quote.htm l>
            <http://cfaj.freeshell. org/google/ (taming google)
            <http://members.fortune city.com/nnqweb/ (newusers)

            --
            [mail]: Chuck F (cbfalconer at maineline dot net)
            [page]: <http://cbfalconer.home .att.net>
            Try the download section.


            ** Posted from http://www.teranews.com **

            Comment

            • Antoninus Twink

              #7
              Re: How to get the pid of a process that send a signal to my program

              On 12 Jun 2008 at 0:15, CBFalconer wrote:
              "hugo.arregui@g mail.com" wrote:
              >>
              >Thanks you Keith, but Veza answer my question, i didn't read
              >sigaction parameters.
              >
              You still don't know if the answer is correct, and even if it was
              Veza had no business answering it here, where it is off topic.
              If you're still reading, please note that Thomson and Falconer have a
              very narrow view of topicality, not shared by many other posters. Don't
              let them bully you into not asking questions here in future.

              Comment

              • Kenny McCormack

                #8
                Re: How to get the pid of a process that send a signal to my program

                In article <slrng51mf2.8v5 .nospam@nospam. invalid>,
                Antoninus Twink <nospam@nospam. invalidwrote:
                >On 12 Jun 2008 at 0:15, CBFalconer wrote:
                >"hugo.arregui@ gmail.com" wrote:
                >>>
                >>Thanks you Keith, but Veza answer my question, i didn't read
                >>sigaction parameters.
                >>
                >You still don't know if the answer is correct, and even if it was
                >Veza had no business answering it here, where it is off topic.
                >
                >If you're still reading, please note that Thomson and Falconer have a
                >very narrow view of topicality, not shared by many other posters. Don't
                >let them bully you into not asking questions here in future.
                They are such old women - it is absolutely scary.

                Just examine CBF's text above. Can't you just see some old biddy
                with absolutely no life, worrying about other people's behavior?

                Comment

                Working...