On Mon, 10 Sep 2018 16:08:40 -0700, Charles Mills wrote:
>
>Ah! pclose(). Got it. I was using fclose() but I see I have a potential timing 
>issue there, ...
>
Yup.  Bummer.

I believe there's a 131k kernel buffer that gives you some slack if you do 
things out
of order.  "Ask yourself, Do I feel lucky?"

Here's an example of that misusage, with a cautionary note:
    
https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.bpxb600/bpx1rx63.htm

>... and pclose() is where I where I would get an error status from. I will try 
>it with a command of bpxmfoo and see if I can detect the error.
> 
If you dont pclose(), your zombie processes may never get reaped.
(Like DETACH.)

Does redirecting 2>&1 let you capture more error messages if the command fails?
Actually, "command 2>&1" captures only error messages "command" itself issues.
"{ command ;} 2>&1" captures additional messages from shell.

>Thanks for your help, @Gil and all. It takes a friggin' village to wade 
>through the IBM documentation.
> 
Only fair.  They used a friggin' village to write it.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to