Add wait for child
This commit is contained in:
parent
b80e3581b5
commit
6de2340db0
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user