Help - Search - Members - Calendar
Full Version: C3000 - Killall Pppd Doesn't Kill The Process
OESF Forums > Distros, Development, and Model Specific Forums > Model Specific Forums > C1000/3x00 General discussions
jfr
There's probably something silly on my part here, but I wonder whether anyone's seen this problem and/or can help.

I've set things up on my C3000 so that I can connect to my ISP using my mobile phone (Nokia 6220) as an analog modem, via its USB cable and using pppd. (Analog because I have a nice cheap package that doesn't offer digital data, even though the phone itself could do it.) It works fine, except for one thing.

The one thing is that when I try to close the connection by typing (as root) "killall pppd", the message from killall is:
killall: pppd: no process killed
and the connection stays up and running (as does pppd).

I can still kill it by using the process id with 'kill', but eventually I want to do all this from within a C++ program, and the killall by name is a lot more convenient. The command line I'm using to start pppd is:
# pppd /dev/ttyUSB0 connect "/usr/sbin/chat '' AT OK-AT-OK ATDT555555 CONNECT '\d\c'"
where 555555 is replaced by my ISP's phone number.

In fact, killing it by process id from within a program could itself be a problem: there's no file /var/run/pppd while it's running, just /var/run/pppd.tdb. So I don't even know how to find the process id from within my program, short of running ps and parsing its output. An answer to that would at least give me a workround...

I've tried googling of course, but "everyone" seems to say that killall pppd is the way to go to end a connection. So I'm wondering whether this is something particular to the C3000, and hence the post.

It's a stock C3000 by the way, with the original ROM and kernel.
jpmatrix
hmmm
why not use the internal C3000 connection feature ?
i use it with my nokia6630 via bluetooth or via cable and it just work perfectly...
jfr
QUOTE(jpmatrix @ Jun 1 2006, 11:17 AM)
hmmm
why not use the internal C3000 connection feature ?
i use it with my nokia6630 via bluetooth or via cable and it just work perfectly...
*


Two reasons, really. The first is that when I tried to configure it, I came up against a set of dialog boxes in Japanese, and didn't feel happy about trying to guess what to do. Perhaps I missed something? But the second and more compelling reason is that I want the connection to be controlled from within my own program without my intervention, and I'm not sure I could do that with the connection feature.

For now, though, I've handled it with a set of scripts, parsing the output of ps to get the pid value. It ain't pretty, but it does work.

Thanks for the reply!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.