Subject: Re: Minor annoyance
To: Jason S. <root@myname.my.domain.bdt.com>
From: Paul Goyette <paul@pgoyette.bdt.com>
List: port-mac68k
Date: 04/13/1997 19:12:25
Well, those "file not found" errors are from processes that existed when
the readdir happened on the /proc file system, but exitted before the
subdirectories could be searched! /proc is very volatile, since it
represents the state of the running kernel and its current set of
processes.
Even though I put that original script together, the better way to find
the pppd process is to look in /var/run for a file named pppd.ttyxx - if
this file exists, its contents are a printable representation of the
pppd's process id.
BTW, lots of system utilities use this mechanism (sendmail comes to mind
immediately)
On Sun, 13 Apr 1997, Jason S. wrote:
>
> After I heard about popclient on the mailing-list, I dl'd and installed it.
>
> It worked great, but my implementation of it has unleashed a minor annoyance
> on my system. I put together a script:
>
> (borrowing the 'p=...' line from Paul Goyette's ppp-up) to check if pppd is
> running, and if so, fetch my mail.
>
> It works fine. But when cron runs it, I get back an annoying bunch of error
> messages that various /proc/[pid]/status files don't exist. (This does not
> happen when I invoke the script manually). I added the wildcard (statu* instead
> of status) to the grep in an attempt to stop this. Didn't work. So I added the
> sync (hey, it was worth a try). Still didn't work.
>
> The script does what I want it to, but I am really annoyed by the error messages
> and the email I get from cron repeating them.
>
> Any suggestion?
>
> (oops - suggestions)
>
> J.
>
> (If this is ugly, blame it on Berkeley mail...)
>
------------------------------------------------------------------------------
| Paul Goyette | PGP Public Key fingerprint: | E-mail addresses: |
| Network Consultant | 0E 40 D2 FC 2A 13 74 A0 | paul@pgoyette.bdt.com |
| and kernel hacker | E4 69 D5 BE 65 E4 56 C6 | paul_goyette@ins.com |
------------------------------------------------------------------------------