[ale] pppd weird problem

manjitsingh matharu manjitsinghm at yahoo.com
Mon Feb 11 02:00:14 EST 2002


hi,
I am facing a weird problem with pppd implementation.
I am implementing a pppd connection between a client
and server.on the server and client side i am doing
the following things:
server: forks and do following things in child
process.
1. open the device file (/dev/ttyS0) which is opened
sucessfully for the first time.
2. sending init strings to modem and receive modem
responses correctly.
3. starts listening on the device file using read()
function.
client: i start my client which is just using a fork()
and execl() function and on execl it starts the ppp
daemon.
4 : As soon as server listen.it sends a login prompt
using write(fd,"login:") and accepts a user name
.similarly passwd is accepted an it again do a fork()
and execl() and on execl it start pppd.

Every thing is fine the connection is properly
established.

now the problem
1.when i kill the pppd on server side using kill -HUP
and then try to start the whole procedure again then
every thing is fine. 
2. when i kill the pppd on client side first using
kill -HUP then i try to start the whole procedure
again then 
the open() call is blocked on server side.And if i
forcefully try to open the file and try to read/write
it gives me the error "Resourse temporarily
unavailable".Now if i reboot my server and again do
the whole procedure then every thing is fine.So i need
to reboot the server when ever i kill pppd from client
side.

Actually i want to close the connection from client
side only and it is not working.
kindly help me to solve this problem because of this i
am stucked and cannot proceed further. 

__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list