Implement --logfile=<file>, which causes all the log output to be
written to "<file>.pid<pid>".  Useful for tracing trees of processes.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1269 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/vg_mylibc.c b/coregrind/vg_mylibc.c
index 75dedbc..05f662f 100644
--- a/coregrind/vg_mylibc.c
+++ b/coregrind/vg_mylibc.c
@@ -1193,6 +1193,7 @@
    return NULL;
 }
 
+
 /* You'd be amazed how many places need to know the current pid. */
 Int VG_(getpid) ( void )
 {
@@ -1202,6 +1203,14 @@
    return res;
 }
 
+Int VG_(getppid) ( void )
+{
+   Int res;
+   res = vg_do_syscall0(__NR_getppid);
+   return res;
+}
+
+
 /* Return -1 if error, else 0.  NOTE does not indicate return code of
    child! */
 Int VG_(system) ( Char* cmd )