Add wait for child
This commit is contained in:
parent
b80e3581b5
commit
6de2340db0
@ -2,6 +2,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <sys/wait.h>
|
||||||
#include <libscerror.hpp>
|
#include <libscerror.hpp>
|
||||||
#include <libscterm.hpp>
|
#include <libscterm.hpp>
|
||||||
#include "pixels.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]));
|
throw_if_min1(close(pfd[1]));
|
||||||
|
|
||||||
write_image(std::cout, stdin);
|
write_image(std::cout, stdin);
|
||||||
|
|
||||||
|
int exit_status;
|
||||||
|
throw_if_min1(wait(&exit_status));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user