Re: fork to create ppp link !!!



Not very got your meaning. what's your small C program doing?
The zombie is caused by you not call wait() in parent process when the
child is exit.

man wait

And, why you can't bring up your PPP link? Add two lines to your ppp
file:

debug
logfile xxx.log
.....

Then check the debug infomation. Do you have ppp-on ppp-off script? Why
not use this?


On 11月21日, 下午8时34分, sumit1...@xxxxxxxxxxxxxx wrote:
Hi ,

I am sorry if the topic is off this group but i will post anyway.

I am stuck with a issue here .
what i have been trying is to start a PPP link between a phone and host

(n/w) using PPPD daemon in linux using my code.

the psuedo code being something like

pid = fork();

if (pid==0) //child
execlp("/usr/sbin/pppd","115200",file,"<a unique file >",NULL);

else
record_pid in parent;

The unique file has params( is created at run time ):
<device > ( for ex /dev/ttymzx0 for UART 1)
crtscts
nodetach
noauth
defaultroute

Now the issue :
This piece of code is run on a Mobilinux platform with PPPD .ko
inserted in kernel at run time.

(let me be specific , the intention here is to bring up a data path
between phone and network using AT or else !)

but this call does not result in pppd to start else i can see a zombie
process cretaed whcih of course is handled by my signal handlers.

Now if i write a small C program to do the exact above only ( devoid of

all the else i did in my module ) and use the cross compiler to get the

executble for ARM and run it independently on target then this does
seem to bring up the pppd daemon and process does not dies as in my
module.The data path is actully up !!!! the PID of PPPD cnfnms this .

what am i doing wrong?Pls comment .....
thanks for the answers!!!

.



Relevant Pages

  • Re: fork to create ppp link !!!
    ... The zombie is caused by you not call waitin parent process when the ... Actually I ahve disabled that portion of code intentionally!! ... find out the status of prosess (pppd) from cmnd prmt. ...
    (comp.os.linux.development.apps)
  • Re: fork to create ppp link !!!
    ... process cretaed whcih of course is handled by my signal handlers. ... a zombie, it's an indication that the pppd you invoced has been ... if you can switch debugging on (in the pppd) to get ...
    (comp.unix.programmer)
  • Re: fork to create ppp link !!!
    ... The zombie is caused by you not call waitin parent process when the ... to log the PPP fail infomation to see what happened, ... This piece of code is run on a Mobilinux platform with PPPD .ko ... process cretaed whcih of course is handled by my signal handlers. ...
    (comp.os.linux.development.apps)
  • Re: fork to create ppp link !!!
    ... You should *not* be giving pppd the name of a tty device or the ... process cretaed whcih of course is handled by my signal handlers. ... configuration rather than in the C code. ...
    (comp.unix.programmer)
  • Re: fork to create ppp link !!!
    ... process cretaed whcih of course is handled by my signal handlers. ... If you don't see the pppd process in the process list, ...
    (comp.unix.programmer)