Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #182162
| From | <tomas@tuxteam.de> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: TCP proxy for host on subnet |
| Date | 2017-06-13 21:20 +0200 |
| Message-ID | <tRZw5-3tk-5@gated-at.bofh.it> (permalink) |
| References | (4 earlier) <tPpGq-2N6-13@gated-at.bofh.it> <tPq9s-3eA-13@gated-at.bofh.it> <tQMhA-5XJ-1@gated-at.bofh.it> <tQOCJ-7wS-5@gated-at.bofh.it> <tRTh0-7YB-27@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, Jun 13, 2017 at 08:39:03AM -0400, Greg Wooledge wrote: > On Sat, Jun 10, 2017 at 03:20:33PM +0200, tomas@tuxteam.de wrote: > > What the "session" (actually the terminal) is doing when you hit ^C is > > to send a signal (typically number 2, SIGINT) to the running process. > > SIGINT is sent to all the foreground processes, not just one [...] Agreed. > > What the "session" (actually the terminal) is doing when you hit ^C is > > to send a signal (typically number 2, SIGINT) to the running process. > > > > (To find out which one exactly, you can issue "stty -a" on your terminal; > > an entry like "intr = ^C" is telling you that the INT (called here "intr", > > confusing, I know) signal is bound to the CTRL-C key (abbreviated ^C). > > You've got this backwards. The terminal driver has a concept of "the > key that causes me to send SIGINT to all the foreground processes", > a.k.a "the interrupt key". The stty command uses the "intr" label for > this feature. stty -a will show you which key is currently bound to it. > On Linux and BSD systems, by default it is Ctrl-C. On commercial System V > Unix-based machines, it's typically DEL. I think we are saying the same here (although your extra details are, of course very informative). [...] > > kill -INTR <pid> > > Two mistakes here. > > 1) It's -INT, not -INTR. Yes. I obviously got confused with the stty naming :) > 2) Sending SIGINT to a single process is *not* the same as pressing > Ctrl-C in a terminal. Ctrl-C sends SIGINT to all the forground > processes, not just one. Right. As far as I remember, you can send the signal to all members of a process group if you send it to the negative PID of the process group leader. [sysV style process mgmt] > If you're a historian. Otherwise, I wouldn't recommend reading these. > They will warp your brain, and teach you bad habits. I disagree. Know the downsides, use critically. I think I talked about the downsides. If you *have* a process manager (systemd, runit, pies, you name it), then use it. For small tasks, I still use the SysV scheme (and for my usual init). I think I made that clear :) We just seem to differ on "how bad" the classical scheme is: for me, it's "sometimes good enough". But yes, know its downsides. > These are infinitely preferable. They're simpler *and* more robust. > > Aso see <http://mywiki.wooledge.org/ProcessManagement> for a more > general discussion of processes, and why the PID file model fails. Thanks for the wiki entry! Cheers - -- tomás -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAllAOYUACgkQBcgs9XrR2kbr/QCfXr0ls0lYVX2cMmXas9WUTHMs pyAAn1j+iHuqsiCzqdIyr96lmObFeXuO =GUnV -----END PGP SIGNATURE-----
Back to linux.debian.user | Previous | Next — Previous in thread | Find similar | Unroll thread
TCP proxy for host on subnet Ron Leach <ronleach@tesco.net> - 2017-06-05 13:40 +0200
Re: TCP proxy for host on subnet Darac Marjal <mailinglist@darac.org.uk> - 2017-06-05 15:30 +0200
Re: TCP proxy for host on subnet Henning <henning@itcfollmann.com> - 2017-06-05 15:40 +0200
Re: TCP proxy for host on subnet Ron Leach <ronleach@tesco.net> - 2017-06-06 12:00 +0200
Re: TCP proxy for host on subnet <tomas@tuxteam.de> - 2017-06-06 12:50 +0200
Re: TCP proxy for host on subnet Henning Follmann <hfollmann@itcfollmann.com> - 2017-06-06 15:30 +0200
Re: TCP proxy for host on subnet tomas@tuxteam.de - 2017-06-06 16:30 +0200
Re: TCP proxy for host on subnet Henning Follmann <hfollmann@itcfollmann.com> - 2017-06-06 15:40 +0200
Re: TCP proxy for host on subnet Ron Leach <ronleach@tesco.net> - 2017-06-06 18:40 +0200
Re: TCP proxy for host on subnet Greg Wooledge <wooledg@eeg.ccf.org> - 2017-06-06 19:10 +0200
Re: TCP proxy for host on subnet Ron Leach <ronleach@tesco.net> - 2017-06-10 13:00 +0200
Re: TCP proxy for host on subnet <tomas@tuxteam.de> - 2017-06-10 15:30 +0200
Re: TCP proxy for host on subnet Greg Wooledge <wooledg@eeg.ccf.org> - 2017-06-13 14:40 +0200
Re: TCP proxy for host on subnet <tomas@tuxteam.de> - 2017-06-13 21:20 +0200
csiph-web