From owner-freebsd-hackers Tue Nov 24 08:17:24 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA06673 for freebsd-hackers-outgoing; Tue, 24 Nov 1998 08:17:24 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from pau-amma.whistle.com (s205m64.whistle.com [207.76.205.64]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA06668 for ; Tue, 24 Nov 1998 08:17:23 -0800 (PST) (envelope-from dhw@whistle.com) Received: (from dhw@localhost) by pau-amma.whistle.com (8.9.1/8.9.1) id IAA08037; Tue, 24 Nov 1998 08:14:35 -0800 (PST) (envelope-from dhw) Date: Tue, 24 Nov 1998 08:14:35 -0800 (PST) From: David Wolfskill Message-Id: <199811241614.IAA08037@pau-amma.whistle.com> To: hackers@FreeBSD.ORG, kpielorz@tdx.co.uk Subject: Re: Getting PID of parent pipe? In-Reply-To: <36555721.8E3D2CDF@tdx.co.uk> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >Date: Fri, 20 Nov 1998 11:48:49 +0000 >From: Karl Pielorz >Is there an 'easy' way of getting the PID of a parent process feeding a >command's stdin? >e.g. >cat something | foo | bar >I need to get the PID of foo while running as bar... If "bar" is something you can control/modify, it would seem that getppid() would be an appropriate tool. david -- David Wolfskill UNIX System Administrator dhw@whistle.com voice: (650) 577-7158 pager: (650) 371-4621 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message