Date: Mon, 15 May 2000 19:12:04 -0400 (EDT) From: Nicolas Perreten <freebsd@webhosting.com> To: "Olivier Cortes (ML)" <receiver@deep-ocean.net> Cc: Alex Boisvert <boisvert@exoffice.com>, FreeBSD Questions <freebsd-questions@FreeBSD.ORG> Subject: RE: PID of a forked process Message-ID: <Pine.BSF.4.10.10005151910240.10518-100000@livid.webhosting.com> In-Reply-To: <EJEFLAEIHOBBKCGOKMJJMEFFCDAA.receiver@deep-ocean.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Nicolas Perreten Sr. Administrator, Webhosting.com Inc, Member in good standing of PETA, People Eating Tasty Animals On Tue, 16 May 2000, Olivier Cortes (ML) wrote: > you can also try "pidof my_process" > > in a script, there is a little more complex: > > ps ax | grep "my_process" | cut -c1-6 With the above, you risk reading the PID of the grep process.. ps ax | grep "my_process" | grep -v grep | cut -c1-6 is a better bet. -nick Nicolas Perreten Sr. Administrator, Webhosting.com Inc, Member in good standing of PETA, People Eating Tasty Animals To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.10005151910240.10518-100000>