case127:
snprintf(str, sizeof(str), _("command not found")); break;
default:
snprintf(str, sizeof(str),
_("child process exited with exit code %d"),
WEXITSTATUS(exitstatus));
}
} elseif (WIFSIGNALED(exitstatus))
{ #ifdefined(WIN32)
snprintf(str, sizeof(str),
_("child process was terminated by exception 0x%X"),
WTERMSIG(exitstatus)); #else
snprintf(str, sizeof(str),
_("child process was terminated by signal %d: %s"),
WTERMSIG(exitstatus), pg_strsignal(WTERMSIG(exitstatus))); #endif
} else
snprintf(str, sizeof(str),
_("child process exited with unrecognized status %d"),
exitstatus);
/* *Returntheshellexitcode(normally0to255)thatcorrespondstothe *givenwaitstatus.Theargumentisawaitstatusasreturnedbywait(2) *orwaitpid(2),whichalsoappliestopclose(3)andsystem(3).Tosupport *thelattertwocases,wepassthrough"-1"unchanged.
*/ int
wait_result_to_exit_code(int exit_status)
{ if (exit_status == -1) return -1; /* failure of pclose() or system() */ if (WIFEXITED(exit_status)) return WEXITSTATUS(exit_status); if (WIFSIGNALED(exit_status)) return128 + WTERMSIG(exit_status); /* On many systems, this is unreachable */ return -1;
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.12 Sekunden
(vorverarbeitet am 2026-08-07)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.