I have the following code which works on AIX 4.3 but fails at times on AIX 5.3
with:
cat: 0652-054 cannot write to output. There is no process to read data written to a pipe.
validator="${validator_exe} ${validator_parms}"
cmd_line="${CAT} ${data_file} | ${validator} 2>${validator_errors}"
if [ "${create_new_files}" = "Y" ]
then
#
# update the command-line to redirect the translated data to a file
#
cmd_line="${cmd_line} 1> ${new_file}"
print " Input file : ${real_data_file}"
print " Output file: ${new_file}"
fi
#
# run the validator and save the return code
#
eval ${cmd_line}
validator_rc=$?
If I switch the code to use a redirect instead of a pipe for the following line of code it works everytime.
methinks your "validator" maybe having issues handling input from a pipe since the no-pipe command line always works ... check your "validator" for the bug ...
Hi Unix gurus,
I have problem executing remote ssh from cygwin on WIN XP SP2. I have the the public key in the host to have SSH login without the need of password.
I am sure this is not due to path or environment as I can run this within the shell and I added PATH and all necessary LIBPATH within the script.
From windows DOS prompt, i am executing:
ssh user@host /home/user/tmp/prog.ksh
Please see the README file in /usr/lpp/bos for information pertinent to *
this release of the AIX Operating System. *
\*
\*
*******************************************************************************
exec(): 0509-036 Cannot load program /home/user/util/bin/tracking because of the following errors:
0509-150 Dependent module liborbixmt.so could not be loaded.
0509-022 Cannot load module liborbixmt.so.
0509-026 System error: A file or directory in the path name does not exist.
/home/user/tmp/prog.ksh: There is no process to read data written to a pipe
The following script tickles this bug quite nicely in AIX 5.3. Running the same script in Solaris and Linux is fine - you won't get the error. If anyone knows if IBM released a fix for this issue, please post details on this page.
#!/bin/ksh
#
# Test for pipe bug in AIX
#
function testpipe
{
typeset -i count=1 maxcount=$1
print "Testing $maxcount output lines ..."
while [ $count -le $maxcount ]; do
print "Output line $count"
((count+=1))
done | head -1 > /dev/null
}
testpipe 50
testpipe 500
testpipe 5000
sleep 1
Here is the output on AIX 5.3:
Testing 50 output lines ...
Testing 500 output lines ...
Testing 5000 output lines ...
testpipe: There is no process to read data written to a pipe.