Date: Mon, 15 May 2000 14:45:19 -0700 From: Alex Boisvert <boisvert@exoffice.com> To: freebsd-questions@freebsd.org Subject: PID of a forked process Message-ID: <39206FEF.226AE171@exoffice.com>
next in thread | raw e-mail | index | archive | help
Hello, I have a basic BASH-related question. How does one obtain the PID of a forked process in bash? Here's what I'd like to do: #!/usr/local/bin/bash while test 1 do PID = some_long_process & sleep 60 kill -9 PID done I'm going to use this script in a test framework where I need to test an application for recoverability. So I want to start the application, wait for a given amount of time and then kill this application and repeat. So how to I obtain the PID of a process which is forked? I've tried %% but it didn't work. regards, alex. 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?39206FEF.226AE171>