in reply to Re^2: Returning status to parent from pipe
in thread Returning status to parent from pipe

On my system, /bin/sh runs bash. But you could specify which shell you want.
exec(bash => (-c => 'com1 | com2; exit $PIPESTATUS[0]'));