Did you not send this to the gerrit? On Wed, Oct 5, 2016 at 9:44 AM Dan Cross <[email protected]> wrote:
> Add the `getppid()` function to glibc to retrieve a process's > parent process ID. See POSIX: > http://pubs.opengroup.org/onlinepubs/009695399/functions/getppid.html > > Rebuild and reinstall glibc. > > Change-Id: I116129292da56bfd53cc2e6a23d9c9bb7c6246d1 > Signed-off-by: Dan Cross <[email protected]> > --- > .../glibc-2.19-akaros/sysdeps/akaros/getppid.c | 30 > ++++++++++++++++++++++ > 1 file changed, 30 insertions(+) > create mode 100644 > tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/getppid.c > > diff --git > a/tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/getppid.c > b/tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/getppid.c > new file mode 100644 > index 0000000..5d75f44 > --- /dev/null > +++ b/tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/getppid.c > @@ -0,0 +1,30 @@ > +/* Copyright (C) 1991, 1995, 1996, 1997, 2002 Free Software Foundation, > Inc. > + This file is part of the GNU C Library. > + > + The GNU C Library is free software; you can redistribute it and/or > + modify it under the terms of the GNU Lesser General Public > + License as published by the Free Software Foundation; either > + version 2.1 of the License, or (at your option) any later version. > + > + The GNU C Library is distributed in the hope that it will be useful, > + but WITHOUT ANY WARRANTY; without even the implied warranty of > + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + Lesser General Public License for more details. > + > + You should have received a copy of the GNU Lesser General Public > + License along with the GNU C Library; if not, write to the Free > + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA > + 02111-1307 USA. */ > + > +#include <errno.h> > +#include <unistd.h> > +#include <ros/syscall.h> > +#include <ros/procinfo.h> > + > +/* Get the process ID of the calling process's parent. */ > +int > +__getppid () > +{ > + return __procinfo.ppid; > +} > +weak_alias(__getppid, getppid) > -- > 2.8.0.rc3.226.g39d4020 > > -- > You received this message because you are subscribed to the Google Groups > "Akaros" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Akaros" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. For more options, visit https://groups.google.com/d/optout.
