search for: getppid

Displaying 20 results from an estimated 45 matches for "getppid".

2001 Feb 09
0
severe error in SSH session key recovery patch
http://www.core-sdi.com/advisories/ssh1_sessionkey_recovery.htm includes the line of code: kill(SIGALRM, getppid()); This is contained within what is listed as an "unsupported and untested patch" developed by SSH.com. The problem is that the arguments to "kill" are in the wrong order. In other words, to obtain the effect that was apparently intended, the line of code should have been...
2006 Apr 12
1
[PATCH] bug in check_parent_exists() in ssh-agent.c
...s symptom is that "ssh-add -l" executed in the child shell works if you are quick enough, but doesn't work 10 seconds later. Two potential fixes come to mind: A: if (parent_pid != -1 && kill(parent_pid, 0) < 0 && errno == ESRCH) B: if (parent_pid != -1 && getppid() != parent_pid) Fix A assumes that errno == ESRCH means that the process really doesn't exist, and that other errno values mean other things. This assumption would fail in a unix-like OS that, for security reasons, decides not to let processes learn anything about the existence of processes...
2001 Jan 04
2
Patch to allow openssh-2.2.0-p1 to be started from /etc/inittab
...00:21:22 2000 --- openssh-2.2.0p1-pen1/bsd-daemon.c Thu Jan 4 23:32:52 2001 *************** *** 70,74 **** return (0); } ! #endif /* !HAVE_DAEMON */ --- 70,111 ---- return (0); } ! #endif ! ! int ! sshd_daemon(nochdir, noclose) ! int nochdir, noclose; ! { ! int fd; ! ! if (getppid() != 1) ! { ! switch (fork()) { ! case -1: ! return (-1); ! case 0: ! break; ! default: ! _exit(0); ! } ! } ! ! signal(SIGTTOU, SIG_IGN); ! signal(SIGTTIN, SIG_IGN); ! ! if (setsid() == -1 && getppid() != 1) ! return (-1); ! ! if (!nochdir) !...
2020 Jun 14
12
[Bug 3181] New: ssh-agent doesn't exit automatically after child program exits
https://bugzilla.mindrot.org/show_bug.cgi?id=3181 Bug ID: 3181 Summary: ssh-agent doesn't exit automatically after child program exits Product: Portable OpenSSH Version: 8.0p1 Hardware: All OS: All Status: NEW Severity: trivial Priority: P5 Component: ssh-agent
2005 Nov 28
20
open/stat64 syscalls run faster on Xen VM than standard Linux
...access 0.81 0.000041 14 3 uname 0.75 0.000038 19 2 stat64 0.38 0.000019 19 1 ioctl 0.18 0.000009 9 1 time 0.18 0.000009 9 1 getppid 0.16 0.000008 8 1 getpgrp 0.16 0.000008 8 1 getuid32 0.14 0.000007 7 1 getgid32 0.12 0.000006 6 1 getpid 0.12 0.000006 6 1 geteui...
2017 Jan 25
2
parallel::mc*: Is it possible for a child process to know it is a fork?
When using multicore-forking of the parallel package, is it possible for a child process to know that it is a fork? Something like: parallel::mclapply(1:10, FUN = function(i) { test_if_running_in_a_fork() }) I'm looking into ways to protect against further parallel processes (including threads), which not necessarily are created via the parallel:mc* API, are being spawned off recursively.
2014 Jul 25
3
[PATCH] launch: Close file descriptors after fork (RHBZ#1123007).
...up stderr above). */ @@ -747,7 +754,7 @@ launch_direct (guestfs_h *g, void *datav, const char *arg) if (g->recovery_proc) { r = fork (); if (r == 0) { - int i, fd, max_fd; + int i; struct sigaction sa; pid_t qemu_pid = data->pid; pid_t parent_pid = getppid (); @@ -767,13 +774,7 @@ launch_direct (guestfs_h *g, void *datav, const char *arg) /* Close all other file descriptors. This ensures that we don't * hold open (eg) pipes from the parent process. */ - max_fd = sysconf (_SC_OPEN_MAX); - if (max_fd == -1) -...
2014 Jul 30
2
[PATCH v2] launch: Close file descriptors after fork (RHBZ#1123007).
https://bugzilla.redhat.com/show_bug.cgi?id=1123007 This is version 2 of the patch which avoids incorrectly closing stderr, so we can still see debug and error messages. Rich.
2011 May 12
6
[Bug 1905] New: check_parent_exists() logic does not cover all cases
...s symptom is that "ssh-add -l" executed in the child shell works if you are quick enough, but doesn't work 10 seconds later. Two potential fixes come to mind: A: if (parent_pid != -1 && kill(parent_pid, 0) < 0 && errno == ESRCH) B: if (parent_pid != -1 && getppid() != parent_pid) Fix A assumes that errno == ESRCH means that the process really doesn't exist, and that other errno values mean other things. This assumption would fail in a unix-like OS that, for security reasons, decides not to let processes learn anything about the existence of processes...
2014 Jul 28
1
Re: [PATCH] launch: Close file descriptors after fork (RHBZ#1123007).
...up stderr above). */ @@ -747,7 +754,7 @@ launch_direct (guestfs_h *g, void *datav, const char *arg) if (g->recovery_proc) { r = fork (); if (r == 0) { - int i, fd, max_fd; + int i; struct sigaction sa; pid_t qemu_pid = data->pid; pid_t parent_pid = getppid (); @@ -767,13 +774,7 @@ launch_direct (guestfs_h *g, void *datav, const char *arg) /* Close all other file descriptors. This ensures that we don't * hold open (eg) pipes from the parent process. */ - max_fd = sysconf (_SC_OPEN_MAX); - if (max_fd == -1) -...
2010 Nov 05
4
xe cli not working on remote machine
...t;, {st_mode=S_IFREG|0755, st_size=1345687, ...}) = 0 _llseek(0, 0, 0xffd06fe0, SEEK_CUR)     = -1 ESPIPE (Illegal seek) _llseek(1, 0, 0xffd06fd0, SEEK_CUR)     = -1 ESPIPE (Illegal seek) _llseek(2, 0, 0xffd06fd0, SEEK_CUR)     = -1 ESPIPE (Illegal seek) gettimeofday({1288958862, 211487}, NULL) = 0 getppid()                               = 21994 getpid()                                = 21995 rt_sigaction(SIGPIPE, {SIG_IGN, [], 0}, {SIG_DFL, [], 0}, 8) = 0 rt_sigaction(SIGINT, {0x808dde7, [], 0}, {SIG_DFL, [], 0}, 8) = 0 access("/opt/xensource/libexec/stunnel/stunnel", X_OK) = -1 ENOENT (No...
2007 Apr 18
7
[RFC, PATCH 0/24] VMI i386 Linux virtualization interface proposal
In OLS 2005, we described the work that we have been doing in VMware with respect a common interface for paravirtualization of Linux. We shared the general vision in Rik's virtualization BoF. This note is an update on our further work on the Virtual Machine Interface, VMI. The patches provided have been tested on 2.6.16-rc6. We are currently recollecting performance information for the new
2007 Apr 18
7
[RFC, PATCH 0/24] VMI i386 Linux virtualization interface proposal
In OLS 2005, we described the work that we have been doing in VMware with respect a common interface for paravirtualization of Linux. We shared the general vision in Rik's virtualization BoF. This note is an update on our further work on the Virtual Machine Interface, VMI. The patches provided have been tested on 2.6.16-rc6. We are currently recollecting performance information for the new
2019 Jan 25
0
[klibc:update-dash] [VAR] Initialise OPTIND after importing environment
...| 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr/dash/var.c b/usr/dash/var.c index c35e925e..fa248544 100644 --- a/usr/dash/var.c +++ b/usr/dash/var.c @@ -142,6 +142,8 @@ INIT { } } + setvarint("OPTIND", 1, 0); + fmtstr(ppid + 5, sizeof(ppid) - 5, "%ld", (long) getppid()); setvareq(ppid, VTEXTFIXED);
2019 Jan 25
0
[klibc:update-dash] [VAR] Use setvareq to set OPTIND initially
...IXED|VTEXTFIXED, defoptindvar, getoptsreset }, #ifdef WITH_LINENO { 0, VSTRFIXED|VTEXTFIXED, linenovar, 0 }, #endif @@ -142,7 +143,7 @@ INIT { } } - setvarint("OPTIND", 1, 0); + setvareq(defoptindvar, VTEXTFIXED); fmtstr(ppid + 5, sizeof(ppid) - 5, "%ld", (long) getppid()); setvareq(ppid, VTEXTFIXED);
2020 Mar 28
0
[klibc:update-dash] dash: [VAR] Initialise OPTIND after importing environment
...| 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr/dash/var.c b/usr/dash/var.c index c35e925e..fa248544 100644 --- a/usr/dash/var.c +++ b/usr/dash/var.c @@ -142,6 +142,8 @@ INIT { } } + setvarint("OPTIND", 1, 0); + fmtstr(ppid + 5, sizeof(ppid) - 5, "%ld", (long) getppid()); setvareq(ppid, VTEXTFIXED);
2020 Mar 28
0
[klibc:update-dash] dash: [VAR] Use setvareq to set OPTIND initially
...IXED|VTEXTFIXED, defoptindvar, getoptsreset }, #ifdef WITH_LINENO { 0, VSTRFIXED|VTEXTFIXED, linenovar, 0 }, #endif @@ -142,7 +143,7 @@ INIT { } } - setvarint("OPTIND", 1, 0); + setvareq(defoptindvar, VTEXTFIXED); fmtstr(ppid + 5, sizeof(ppid) - 5, "%ld", (long) getppid()); setvareq(ppid, VTEXTFIXED);
2020 Mar 28
0
[klibc:update-dash] dash: var: Set IFS to fixed value at start time
...0, VSTRFIXED|VTEXTFIXED|VUNSET, "MAILPATH\0", changemail }, { 0, VSTRFIXED|VTEXTFIXED, defpathvar, changepath }, @@ -143,6 +135,7 @@ INIT { } } + setvareq(defifsvar, VTEXTFIXED); setvareq(defoptindvar, VTEXTFIXED); fmtstr(ppid + 5, sizeof(ppid) - 5, "%ld", (long) getppid()); diff --git a/usr/dash/var.h b/usr/dash/var.h index 11ce9b7d..52f559d1 100644 --- a/usr/dash/var.h +++ b/usr/dash/var.h @@ -100,12 +100,8 @@ extern struct var varinit[]; #define vhistsize (&vterm)[1] #endif -#ifdef IFS_BROKEN -extern const char defifsvar[]; +extern char defifsvar[]; #de...
2017 Jan 25
0
parallel::mc*: Is it possible for a child process to know it is a fork?
...R_isForkedChild; SEXP is_forked(){ return ScalarLogical(R_isForkedChild); } But that won't be allowed on CRAN: * checking compiled code ... NOTE Found non-API call to R: ?R_isForkedChild? Compiled code should not call non-API entry points in R. Another method would be to look at getppid(2) and getpgid(2) to lookup the parent-id and group-id of the current process and test if it matches that of the (parent) R process. If you are only interested in limiting further parallelization within the fork, perhaps you can simply use parallel::mcaffinity to restrict the forked process to a s...
2001 Aug 10
1
Solaris X86
I ran freecell under wine -debugmsg +relay and got an exception with a message protocol error: 84a28e8: init_process : parent but no info just after SHOWWINDOW was called Anyone know what this means ?