Syntactic Confectionery Delight | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I have a problem that is driving me to the brink. I am calling an external script from a daemonized perl script. The external perl script is used to connect to a NetApp filer and get the major and minor API release level, and return in to the calling daemon. Here's my problem. Sometimes the daemon script collects the stdout of the external, and in other cases it doesn't. However, when the external script is run from the command line, it works in all cases. Here's my code snippet where I call the external.
Both the daemon and the external use syslog to write to the application log file. Here's the final processing from the external:
and here's what I log from the daemon:
and finally, here's what shows up in the log file:
So, the external logs the proper version info, but the print to STDOUT is not captured by the qx. As I said before, running the external stand-alone prints the proper version info. More weird is that the daemon works as expected if the returned OnTap version from the NetApp is 1.21; it only fails if the returned OnTap version is 1.31, and only fails when being invoked through the daemon. However, the external is connecting to the NetApp, getting the proper API release, and logging it. In reply to qx not always capturing stdout by StuLong
|
|