I have a perl script in which I am forking a child process. Here is what I am doing:
my $pid = fork;
if($pid) {
# parent
waitpid($pid, 0);
}
else {
exec("some other script X.pl");
}
Now, I wanted to capture the error of X.pl to display in my script. But as I understand this is not possible suing exec.
What are the other options I have?
How can I use open3 in my case?
Thanks!