[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Control pppd behaviour

Thanks James.

I do understand the daemon part. We do run the pppd as daemon that is
in the background, we don't run from terminal but an application runs
this. And able to catch exit codes as well !
But pppd doesn't exit if say authetication fails, instead it will retry.

I did have a look at maxfail:
maxfail n
    Terminate after n consecutive failed connection attempts. A value
of 0 means no limit. The default value is 10.

I wanted to have 0 retries. Is there a way ?

On Thu, Feb 11, 2010 at 10:31 PM, James Carlson
<carlsonj@xxxxxxxxxxxxxxx> wrote:
> Ashmath Khan wrote:
>> Thanks James.
>>>From man page:
>> updetach
>>     With this option, pppd will detach from its controlling terminal
>> once it has successfully established the ppp connection (to the point
>> where the first network control protocol, usually the IP control
>> protocol, has come up).
>> How about if chap authentication fails ? then updetach won't work.
> If authentication fails, then pppd exits with an error code as
> documented.  The man page entry for updetach documents the _latest_
> point at which the daemon will exit, not the earliest point.
> Basically, by using updetach, you can rely on the exit code from pppd to
> tell you whether it was successful in starting the session (exit code 0)
> and is now running in the background, or whether it failed to start
> (exit code != 0).
> I suspect this is the behavior you're looking for.
>> what is controlling terminal here ?
> It's a UNIX term.  Processes may or may not have what's called a
> "controlling terminal."
> When you start a process from a shell, the controlling terminal is
> usually your tty.  This allows you to (for instance) press ^C and
> interrupt that process.  It's what also terminates any lingering
> processes with SIGHUP when you log out.
> Processes that run as daemons generally disconnect from the controlling
> terminal, so that they are no longer affected by the user who originally
> started the process (unless explicitly sent a signal with "kill").
> For more information, you may want to try googling the term.
> --
> James Carlson         42.703N 71.076W         <carlsonj@xxxxxxxxxxxxxxx>
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Linux Audio Users]     [Hams]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Photo]     [Yosemite Photos]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linux Resources]     [Fedora Users]

Powered by Linux