Re: [Hampshire] restoring Mozilla Thunderbird and Firefox fr…

Top Page
Author: Hugo Mills
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] restoring Mozilla Thunderbird and Firefox from backup

Reply to this message
gpg: failed to create temporary file '/var/lib/lurker/.#lk0x572fb100.hantslug.org.uk.28389': Permission denied
gpg: keyblock resource '/var/lib/lurker/pubring.gpg': Permission denied
gpg: Signature made Wed Jul 9 20:40:23 2008 BST
gpg: using DSA key 20ACB3BE515C238D
gpg: Can't check signature: No public key
On Wed, Jul 09, 2008 at 08:21:33PM +0100, Lisi wrote:
> On Wednesday 09 July 2008 19:23:28 Hugo Mills wrote:
> > On Wed, Jul 09, 2008 at 06:41:24PM +0100, Lisi wrote:
> > > On Wednesday 09 July 2008 18:22:23 Hugo Mills wrote:
> > > > On Wed, Jul 09, 2008 at 05:47:11PM +0100, Lisi wrote:
> > > >    You want -9, not 9 here. However, there's no thunderbird running
> > > > (or at least, no process with "thunder" in the name), so it's a moot
> > > > point.

> > >
> > > Is that not what this is saying? I clearly misunderstood it.
> > >
> > > [root@Dozy peter]# ps -ef | grep thunderbird
> > > root      4099  4055  0 17:33 pts/3    00:00:00 grep --color thunderbird

> > >
> > > Next question: what does
> > >
> > > root      4099  4055  0 17:33 pts/3    00:00:00 grep --color thunderbird

> > >
> > > mean?
> >
> > hrm@selene:~ $ ps -ef
> > UID        PID  PPID  C STIME TTY          TIME CMD
> > [...]
> > root      4099  4055  0 17:33 pts/3    00:00:00 grep --color thunderbird

> >
> > UID = user running the process.
> > PID = process ID
> > PPID = parent process ID
> > C = CPU usage (%)
> > STIME = start time
> > TTY = pseudo-terminal that the process is attached to
> > TIME = total CPU usage
> > CMD = command -- in this case, it's the grep process you ran to find
> > things with "thunderbird" in (which has the word "thunderbird"
> > appears, obviously)
>
> Thanks, Hugo. But that just leaves me baffled. That was exactly what I
> originally thought - but when I tried to use the PID and PPID with kill to
> shut the wretched thing down it said that the PID did not exist. :-(


That's right.

The process you are trying to kill is the second one in this
pipeline:

$ ps -ef | grep thunderbird

That pipeline starts two commands: one which lists all the
processes running on the machine, and one which filters that list,
looking for the text "thunderbird".

When these processes run, they will both turn up in the process
list from the first one (the ps). The second one (the grep) contains
the string "thunderbird" in it, so it will find *itself*. This is what
the process you get is. Take a look at the command in the example
above: it reads "grep --color thunderbird". This is the grep process
you ran in the pipeline to get that output. It is not Thunderbird.
Thunderbird is not running.

By the time you've got the "kill" command typed (to try and kill
the grep process... which isn't what you wanted to do anyway), the
grep process has already finished, so it doesn't exist any more, so
you can't kill it.

Hugo.

-- 
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
  --- Anyone who says their system is completely secure understands ---  
                      neither systems nor security.