File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
library/std/src/sys/unix/process Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -698,11 +698,12 @@ impl Command {
698698
699699 msg. msg_iov = & mut iov as * mut _ as * mut _ ;
700700 msg. msg_iovlen = 1 ;
701- msg. msg_controllen = mem:: size_of_val ( & cmsg. buf ) as _ ;
702- msg. msg_control = & mut cmsg. buf as * mut _ as * mut _ ;
703701
704702 // only attach cmsg if we successfully acquired the pidfd
705703 if pidfd >= 0 {
704+ msg. msg_controllen = mem:: size_of_val ( & cmsg. buf ) as _ ;
705+ msg. msg_control = & mut cmsg. buf as * mut _ as * mut _ ;
706+
706707 let hdr = CMSG_FIRSTHDR ( & mut msg as * mut _ as * mut _ ) ;
707708 ( * hdr) . cmsg_level = SOL_SOCKET ;
708709 ( * hdr) . cmsg_type = SCM_RIGHTS ;
@@ -719,7 +720,7 @@ impl Command {
719720 // so we get a consistent SEQPACKET order
720721 match cvt_r ( || libc:: sendmsg ( sock. as_raw ( ) , & msg, 0 ) ) {
721722 Ok ( 0 ) => { }
722- _ => rtabort ! ( "failed to communicate with parent process" ) ,
723+ other => rtabort ! ( "failed to communicate with parent process. {:?}" , other ) ,
723724 }
724725 }
725726 }
You can’t perform that action at this time.
0 commit comments