diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 2001-05-03 02:25:07 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 2001-05-03 02:25:07 +0000 |
commit | 9224c6adb9a31394171fbbddd77d7e138069700e (patch) | |
tree | 44d5faff6ca4a38e756c6cd452076d1bed7b3769 /ace/Process.cpp | |
parent | bdde24f70c2447efaae610768d3576dc143ecb75 (diff) | |
download | ATCD-9224c6adb9a31394171fbbddd77d7e138069700e.tar.gz |
ChangeLogTag:Wed May 2 18:36:29 2001 Douglas C. Schmidt <schmidt@tango.doc.wustl.edu>
Diffstat (limited to 'ace/Process.cpp')
-rw-r--r-- | ace/Process.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/ace/Process.cpp b/ace/Process.cpp index f4df495b037..050391ef389 100644 --- a/ace/Process.cpp +++ b/ace/Process.cpp @@ -125,6 +125,16 @@ ACE_Process::spawn (ACE_Process_Options &options) ACE_LIB_TEXT ("%p.\n"), ACE_LIB_TEXT ("ACE_Process::spawn: setpgid failed."))); +#if !defined (ACE_LACKS_SETREGID) + if (options.getrgid () != (uid_t) -1 + || options.getegid () != (uid_t) -1) + if (ACE_OS::setregid (options.getrgid (), + options.getegid ()) == -1) + ACE_ERROR ((LM_ERROR, + ACE_LIB_TEXT ("%p.\n"), + ACE_LIB_TEXT ("ACE_Process::spawn: setregid failed."))); +#endif /* ACE_LACKS_SETREGID */ + #if !defined (ACE_LACKS_SETREUID) // Set user and group id's. if (options.getruid () != (uid_t) -1 @@ -136,16 +146,6 @@ ACE_Process::spawn (ACE_Process_Options &options) ACE_LIB_TEXT ("ACE_Process::spawn: setreuid failed."))); #endif /* ACE_LACKS_SETREUID */ -#if !defined (ACE_LACKS_SETREGID) - if (options.getrgid () != (uid_t) -1 - || options.getegid () != (uid_t) -1) - if (ACE_OS::setregid (options.getrgid (), - options.getegid ()) == -1) - ACE_ERROR ((LM_ERROR, - ACE_LIB_TEXT ("%p.\n"), - ACE_LIB_TEXT ("ACE_Process::spawn: setregid failed."))); -#endif /* ACE_LACKS_SETREGID */ - this->child (ACE_OS::getppid ()); } else if (this->child_id_ != -1) |