search for: killpg

Displaying 8 results from an estimated 8 matches for "killpg".

2013 Feb 15
2
getpgrp
These days, sshd.c has: static void grace_alarm_handler(int sig) { ... if (getpgid(0) == getpid()) { signal(SIGTERM, SIG_IGN); killpg(0, SIGTERM); } sigdie(...); } however (really) old BSDs do not have getpgid(). They do have getpgrp(), which does what we want here. The question is what to do if we have neither: return the pid (and thus terminate nothing) or return -1 and kill everything wihout getting to the s...
2002 Jan 31
4
signal transmission in ssh2
...USR1); + SIG(USR2); + return -1; +} + +static int +session_signal_req(Session *s) +{ + char *signame; + int sig; + + signame = packet_get_string(NULL); + sig = name2sig(signame); + xfree(signame); + packet_done(); + + if (sig >= 0 && s->pid > 0) { + debug("session_signal_req: killpg(%d, %d)", + s->pid, sig); + if (killpg(s->pid, sig) < 0) + error("session_signal_req: killpg(%d, %d): %s", + s->pid, sig, strerror(errno)); + } + return 0; +} + void session_input_channel_req(int id, void *arg) { @@ -1419,6 +1460,8 @@ } if (strcmp(rty...
2001 Oct 29
0
signal messages
...USR1); + SIG(USR2); + return -1; +} + +static int +session_signal_req(Session *s) +{ + char *signame; + int sig; + + signame = packet_get_string(NULL); + sig = name2sig(signame); + xfree(signame); + packet_done(); + + if (sig >= 0 && s->pid > 0) { + debug("session_signal_req: killpg(%d, %d)", + s->pid, sig); + if (killpg(s->pid, sig) < 0) + error("session_signal_req: killpg(%d, %d): %s", + s->pid, sig, strerror(errno)); + } + return 0; +} + void session_input_channel_req(int id, void *arg) { @@ -1427,6 +1468,8 @@ } if (strcmp(rty...
2018 Aug 01
2
trying to resurrect discussion about "Cannot signal a process over a channel (rfc 4254, section 6.9)"
...gt; This is because in the other possible configuration, a shell is launched by the server. Then when we launch a process, it is forked by this shell and thus it has its own group-id. > > When the user launches a signal-request hoping to reach a blocking process, the pid that is used by the ?killpg? function is the one of the shell. So it is this shell that catches the signal resulting in it: > - dying and leaving zombies > - dying and taking its child with him (SIGHUP and SIGKILL) > - ignoring the signal (SIGINT, SIGTERM, SIGQUIT). > > Example of ID?s when I connect to a...
2018 Jul 13
2
trying to resurrect discussion about "Cannot signal a process over a channel (rfc 4254, section 6.9)"
Hi, >>> It would be nice to know what the precise technical issues are that have >>> prevented support for this from being added. From what I recall, it >>> seemed like the delay was largely due to details of the client >>> behaviour, and possibly some feature creep. It would indeed be really great to have some details on this point. Concerning the test of
2001 Dec 10
10
hang on exit bug under Linux
>From what I understand, the problem is due to people's disagreement about what the "correct" behavior should be. I'm pretty sure that the following is the correct behavior from running rsh and ssh often (both fsecure and openssh). Lets say you have a stupid script that does while 1 do sleep 1 done Called foreverSleep on your remote host: rsh remotehost
2013 Feb 26
16
Call for testing: OpenSSH-6.2
Hi, It's that time again... OpenSSH 6.2 is almost ready for release, so we would appreciate testing on as many platforms and systems as possible. This release contains some substantial new features and a number of bugfixes. Snapshot releases for portable OpenSSH are available from http://www.mindrot.org/openssh_snap/ The OpenBSD version is available in CVS HEAD:
2014 Jan 17
15
Call for testing: OpenSSH-6.5
Hi, OpenSSH 6.5 is almost ready for release, so we would appreciate testing on as many platforms and systems as possible. This release contains some substantial new features and a number of bugfixes. Snapshot releases for portable OpenSSH are available from http://www.mindrot.org/openssh_snap/ The OpenBSD version is available in CVS HEAD: http://www.openbsd.org/anoncvs.html Portable OpenSSH is