How does shell get the exit status of a child shell while redirecting the output to a file?

scenario: the shell script completes the ETL work. The data extraction, transformation and loading operations correspond to three subscripts, all of which are atomic operations and need to be logged.
idea: call multiple child scripts to control the workflow through a single parent script, and get the exit status and output of the subscript at the same time.
problem: the following script cannot get the exit status of the subscript. You need to have standard output and error output on the screen and log it at the same time.

< H1 >! / bin/bash < / H1 > < H1 > parent.sh < / H1 >

echo "You are in parent shell." | tee $0 ".log"
. / child.sh; rc=$? | tee-a $0 ".log"
echo $rc

< H1 >! / bin/bash < / H1 > < H1 > child.sh < / H1 >

echo "You are in child shell."
exit 1-sharp-sharp-sharp problem description

the platform version of the problem and what methods you have tried

related codes

/ / Please paste the code text below (do not replace the code with pictures)

what result do you expect? What is the error message actually seen?

Aug.31,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b32c33-2be45.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b32c33-2be45.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?