-/*
-
- LOCAL FUNCTION
-
- save_inferior_pid - Save inferior_pid on the cleanup list
- restore_inferior_pid - Restore inferior_pid from the cleanup list
-
- SYNOPSIS
-
- struct cleanup *save_inferior_pid ()
- void restore_inferior_pid (int pid)
-
- DESCRIPTION
-
- These two functions act in unison to restore inferior_pid in
- case of an error.
-
- NOTES
-
- inferior_pid is a global variable that needs to be changed by many of
- these routines before calling functions in procfs.c. In order to
- guarantee that inferior_pid gets restored (in case of errors), you
- need to call save_inferior_pid before changing it. At the end of the
- function, you should invoke do_cleanups to restore it.
-
- */
-
-
-static struct cleanup *
-save_inferior_pid ()
-{
- return make_cleanup (restore_inferior_pid, inferior_pid);
-}
-
-static void
-restore_inferior_pid (pid)
- int pid;
-{
- inferior_pid = pid;
-}
-\f
-static int find_active_thread (void);