From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 19 13:03:29 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ABE8B106568B for ; Fri, 19 Jun 2009 13:03:29 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.netplex.net (mail.netplex.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id 6E6C68FC16 for ; Fri, 19 Jun 2009 13:03:29 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.3/8.14.3/NETPLEX) with ESMTP id n5JD3S7B015434; Fri, 19 Jun 2009 09:03:28 -0400 (EDT) X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.netplex.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-4.0 (mail.netplex.net [204.213.176.10]); Fri, 19 Jun 2009 09:03:28 -0400 (EDT) Date: Fri, 19 Jun 2009 09:03:28 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: vasanth raonaik In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: Regarding Signal IPC X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2009 13:03:30 -0000 On Fri, 19 Jun 2009, vasanth raonaik wrote: > Hello Hackers, > > I want to print out the process ID of the process which is sending the > Signal. > > Is it possible. if yes, can you please point me to any related documents. Though I have not tried this, there is an si_pid field (and other fields you might be interested in) in struct siginfo. If you use a POSIX signal handler (see sigaction(2)), a pointer to a struct siginfo is the 2nd argument to your signal handler. See for the definition of struct siginfo. -- DE