fix: check syscall

This commit is contained in:
Renge 2022-04-15 22:59:46 -04:00
parent f9906ed62c
commit e6b14fa80e

View File

@ -284,6 +284,9 @@ int jobs_run(PIPELINE *pline) {
for (size_t i = 0; i < size; i++) for (size_t i = 0; i < size; i++)
{ {
pids[i] = fork(); pids[i] = fork();
if(pids[i] == -1) {
return -1;
}
if (pids[i] == 0) if (pids[i] == 0)
{ {
// is a child process // is a child process