How to tell when bitcoin has really stopped running I would like to take bitcoin block data and send it use it to avoid having to go through the blockchain download again on other computers in my local network. To ensure that no db corruption occurs, I stop bitcoin before the transfer. Running the unix command bitcoind stop will return 

Bitcoin has stopped running!


I notice that it does still run in top for a few moments after getting this message. This is not a problem right as it's never more than 15 seconds, however I am looking to automate this process using a simple php script.

Using bitcoin-rpc command such as $status = $bitcoin-&gt;stop() would yeild a result of "Bitcoin has stopped running" but it may still be running in top.

How do I make sure that bitcoin really stopped running? Or is it safe to preform data transfer as soon as I get this message (does bitcoin keep writing to db after it notifies you it has stopped)?
On linux: 

ps aux | grep bitcoind


Or even:

watch ps aux | grep bitcoind


But to answer your question slightly differently I'd suggest keeping existing bitcoind running.  Then your new node add a connect statement with the local ip of the old node in the bitcoin.conf file (located usually in $HOME/.bitcoin/).  

Your new node will then solely connect to the existing node and download, via your local network all the blocks from the existing node.

Also if both PCs are imobile you could leave it that way to avoid duplicate downloads from the internet.  An alternative if the second is a laptop for example is to use -addnode instead. From here:

-addnode=&lt;ip&gt;          Add a node to connect to and attempt to keep the connection open
-connect=&lt;ip&gt;          Connect only to the specified node(s)
-dns                   Allow DNS lookups for -addnode, -seednode and -connect (default: 1)