mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 06:15:37 +00:00
Log the process id in the debug file output. Since we don't want
to keep calling getpid(), stash the value at init time and when we fork().
This commit is contained in:
@@ -441,7 +441,7 @@ send_mail(const char *fmt, ...)
|
||||
debug_return;
|
||||
|
||||
/* Fork and return, child will daemonize. */
|
||||
switch (pid = fork()) {
|
||||
switch (pid = sudo_debug_fork()) {
|
||||
case -1:
|
||||
/* Error. */
|
||||
error(1, _("unable to fork"));
|
||||
@@ -510,7 +510,7 @@ send_mail(const char *fmt, ...)
|
||||
_exit(1);
|
||||
}
|
||||
|
||||
switch (pid = fork()) {
|
||||
switch (pid = sudo_debug_fork()) {
|
||||
case -1:
|
||||
/* Error. */
|
||||
mysyslog(LOG_ERR, _("unable to fork: %m"));
|
||||
|
Reference in New Issue
Block a user