Author Topic: C3000 - Killall Pppd Doesn't Kill The Process  (Read 2905 times)

jfr

  • Newbie
  • *
  • Posts: 36
    • View Profile
C3000 - Killall Pppd Doesn't Kill The Process
« on: May 30, 2006, 05:53:38 pm »
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.
« Last Edit: May 30, 2006, 05:58:14 pm by jfr »

jpmatrix

  • Hero Member
  • *****
  • Posts: 1014
    • View Profile
    • http://matrixmen.free.fr
C3000 - Killall Pppd Doesn't Kill The Process
« Reply #1 on: June 01, 2006, 06:17:37 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...
**Fujitsu U1010 !!!  
**ex-Zaurus SL-C3000 owner with Debian kernel 2.6.24-yonggun

jfr

  • Newbie
  • *
  • Posts: 36
    • View Profile
C3000 - Killall Pppd Doesn't Kill The Process
« Reply #2 on: June 01, 2006, 11:09:34 am »
Quote
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...
[div align=\"right\"][a href=\"index.php?act=findpost&pid=129279\"][{POST_SNAPBACK}][/a][/div]

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!