Bluehost.com Web Hosting $6.95

[stunnel-users] How do I kill stunnel?

This is a discussion on [stunnel-users] How do I kill stunnel? within the Stunnel Users forums, part of the Networking and Network Related category; I've got an application that starts stunnel using equivalent of a fork/exec. The stunnel process then appears to ...


Go Back   Usenet Forums > Networking and Network Related > Stunnel Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-25-2008
Grant Edwards
 
Posts: n/a
Default [stunnel-users] How do I kill stunnel?

I've got an application that starts stunnel using equivalent of
a fork/exec. The stunnel process then appears to fork off
multiple copies of itself.

Before the application exits, it needs to stop stunnel. I send
a SIGINT to the PID that was created using the fork, but only
the first "master" copy terminates -- the master stunnel
process doesn't terminate its children when it exits. So I end
up with a bunch of "orphaned" stunnel processes. They're not
zombies, they're process that are either in state R or S
(runnable or sleeping).

How do I tell stunnel to not only terminate, but to terminate
whatever child processes it has created?

--
Grant Edwards grante Yow! Zippy's brain cells
at are straining to bridge
visi.com synapses ...

_______________________________________________
stunnel-users mailing list
stunnel-users@mirt.net
http://stunnel.mirt.net/mailman/listinfo/stunnel-users

Reply With Quote
  #2 (permalink)  
Old 06-25-2008
Grant Edwards
 
Posts: n/a
Default Re: [stunnel-users] How do I kill stunnel?

On 2008-06-25, Grant Edwards <grante@visi.com> wrote:
> I've got an application that starts stunnel using equivalent of
> a fork/exec. The stunnel process then appears to fork off
> multiple copies of itself.
>
> Before the application exits, it needs to stop stunnel. I send
> a SIGINT to the PID that was created using the fork, but only
> the first "master" copy terminates -- the master stunnel
> process doesn't terminate its children when it exits. So I end
> up with a bunch of "orphaned" stunnel processes. They're not
> zombies, they're process that are either in state R or S
> (runnable or sleeping).


What's really annoying is that one of those orphaned stunnel
processes is sucking up all the CPU it can (there are no active
connections).

--
Grant Edwards grante Yow! VICARIOUSLY experience
at some reason to LIVE!!
visi.com

_______________________________________________
stunnel-users mailing list
stunnel-users@mirt.net
http://stunnel.mirt.net/mailman/listinfo/stunnel-users

Reply With Quote
  #3 (permalink)  
Old 06-25-2008
Grant Edwards
 
Posts: n/a
Default Re: [stunnel-users] How do I kill stunnel?

On 2008-06-25, Grant Edwards <grante@visi.com> wrote:

> I've got an application that starts stunnel using equivalent of
> a fork/exec. The stunnel process then appears to fork off
> multiple copies of itself.


That actually raises another question: why does it take 6
copies of the stunnel process to handle the forwarding of one
TCP port?

--
Grant Edwards grante Yow! Will it improve my
at CASH FLOW?
visi.com

_______________________________________________
stunnel-users mailing list
stunnel-users@mirt.net
http://stunnel.mirt.net/mailman/listinfo/stunnel-users

Reply With Quote
  #4 (permalink)  
Old 06-25-2008
Peter Pentchev
 
Posts: n/a
Default Re: [stunnel-users] How do I kill stunnel?

On Wed, Jun 25, 2008 at 02:57:39PM +0000, Grant Edwards wrote:
> I've got an application that starts stunnel using equivalent of
> a fork/exec. The stunnel process then appears to fork off
> multiple copies of itself.
>
> Before the application exits, it needs to stop stunnel. I send
> a SIGINT to the PID that was created using the fork, but only
> the first "master" copy terminates -- the master stunnel
> process doesn't terminate its children when it exits. So I end
> up with a bunch of "orphaned" stunnel processes. They're not
> zombies, they're process that are either in state R or S
> (runnable or sleeping).
>
> How do I tell stunnel to not only terminate, but to terminate
> whatever child processes it has created?


If you have built stunnel with libwrap support, chances are high
that the patch from this message might help you:

http://stunnel.mirt.net/pipermail/st...ne/002021.html

G'luck,
Peter

--
Peter Pentchev roam@ringlet.net roam@cnsys.bg roam@FreeBSD.org
PGP key: http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553
This would easier understand fewer had omitted.

_______________________________________________
stunnel-users mailing list
stunnel-users@mirt.net
http://stunnel.mirt.net/mailman/listinfo/stunnel-users

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (FreeBSD)

iEYEARECAAYFAkhiZm4ACgkQ7Ri2jRYZRVN1lACeLkN+oeCYaD SLN6iQfGCIK1vc
LF8An3AYlYFJhFNnxuASC39LLjn/94Gl
=ZvFn
-----END PGP SIGNATURE-----

Reply With Quote
  #5 (permalink)  
Old 06-25-2008
Grant Edwards
 
Posts: n/a
Default Re: [stunnel-users] How do I kill stunnel?

On 2008-06-25, Peter Pentchev <roam@ringlet.net> wrote:
> On Wed, Jun 25, 2008 at 02:57:39PM +0000, Grant Edwards wrote:


>> Before the application exits, it needs to stop stunnel. I send
>> a SIGINT to the PID that was created using the fork, but only
>> the first "master" copy terminates -- the master stunnel
>> process doesn't terminate its children when it exits.

[...]

> If you have built stunnel with libwrap support, chances are high
> that the patch from this message might help you:
>
> http://stunnel.mirt.net/pipermail/st...ne/002021.html


I decided to run stunnel in its own process group. That way I
can just send a SIGINT to the whole group when I want stunnel
to terminate. So far it seems to be working...

--
Grant Edwards grante Yow! Hmmm ... an arrogant
at bouquet with a subtle
visi.com suggestion of POLYVINYL
CHLORIDE ...

_______________________________________________
stunnel-users mailing list
stunnel-users@mirt.net
http://stunnel.mirt.net/mailman/listinfo/stunnel-users

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 04:09 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0