I used the spawnvp() call to create a child process to start the pppd
program.
pppd_id=spawnvp(P_NOWAIT, args[0], args);
The pppd started fine, but when it came to stop the pppd program, I called
kill(pppd_id, SIGTERM), and did waitpid(). The waitpid came back with the
same id as pppd_id, but the pppd process is still there when I did
pidin|grep pppd. What am I missing?
The pppd started fine, but when it came to stop the pppd program, I called
kill(pppd_id, SIGTERM), and did waitpid(). The waitpid came back with the
same id as pppd_id, but the pppd process is still there when I did
pidin|grep pppd. What am I missing?
Probably the pppd forks itself, and then this behaviour is OK.
I’ve no idea how to check pppd’s existance via it’s PID,
but perhaps you can check the interfaces (/dev/io-net/ppp*) or so.
Thanks for you response. If pppd forks itself, is there anyway I can get the
process id of the pppd so that I can kill it when the parent process dies?
Beth <> id@net.com> > wrote:
The pppd started fine, but when it came to stop the pppd program, I
called
kill(pppd_id, SIGTERM), and did waitpid(). The waitpid came back with
the
same id as pppd_id, but the pppd process is still there when I did
pidin|grep pppd. What am I missing?
Probably the pppd forks itself, and then this behaviour is OK.
I’ve no idea how to check pppd’s existance via it’s PID,
but perhaps you can check the interfaces (/dev/io-net/ppp*) or so.
Thanks for you response. If pppd forks itself, is there anyway I can get
the
process id of the pppd so that I can kill it when the parent process dies?
-Beth
Karsten.Hoffmann@mbs-software.de> > wrote in message
news:bde28j$2kb$> 2@gate.internal> …
Beth <> id@net.com> > wrote:
The pppd started fine, but when it came to stop the pppd program, I
called
kill(pppd_id, SIGTERM), and did waitpid(). The waitpid came back with
the
same id as pppd_id, but the pppd process is still there when I did
pidin|grep pppd. What am I missing?
Probably the pppd forks itself, and then this behaviour is OK.
I’ve no idea how to check pppd’s existance via it’s PID,
but perhaps you can check the interfaces (/dev/io-net/ppp*) or so.