Add wait for child

This commit is contained in:
Bob Polis 2024-02-06 11:53:39 +01:00
parent b80e3581b5
commit 6de2340db0

View File

@ -2,6 +2,7 @@
#include <string>
#include <sstream>
#include <unistd.h>
#include <sys/wait.h>
#include <libscerror.hpp>
#include <libscterm.hpp>
#include "pixels.hpp"
@ -46,6 +47,9 @@ void convert(const std::string& path) { // try to convert to ppm using ImageMagi
throw_if_min1(close(pfd[1]));
write_image(std::cout, stdin);
int exit_status;
throw_if_min1(wait(&exit_status));
break;
}
}