char *argv[] = { "", "-e", "0" }; perl_parse(perl, NULL, 3, argv, NULL); perl_run(perl);
If I do that before I start cloning the children, everything works great. Thanks to everyone who pitched in ideas.
Jeremy Redburn wrote:
Jeremy Redburn wrote:
Nick Ing-Simmons wrote:
Jeremy Redburn <[EMAIL PROTECTED]> writes:
Hello, I have some code which maintains a pool of Perl interpreters in C and allocates an interpreter as requests come in. It works well enough, but I have run into an issue that my embedded Perl code cannot print to STDOUT or STDERR.
What happens - what does $! show?
I have this statement in my code:
print STDERR "Testing" || print LOG "Error: $!"
Nothing gets printed to the terminal, and LOG doesn't have any content. I can print to LOG fine if I do it directly.
Thanks to Garry Williams, I realized this of course will not work. When I change '||' to 'or' I do get an error:
Error: Bad file descriptor
Any ideas?