File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -441,15 +441,14 @@ fn close_dir_fds(keep: KeepFds<'_>) -> nix::Result<()> {
441441fn close_filetable_fds ( keep : KeepFds < ' _ > ) -> nix:: Result < ( ) > {
442442 use nix:: fcntl;
443443 use std:: os:: fd:: { FromRawFd , OwnedFd } ;
444- let fd = fcntl:: open (
444+ let filetable = fcntl:: open (
445445 c"/scheme/thisproc/current/filetable" ,
446446 fcntl:: OFlag :: O_RDONLY ,
447447 nix:: sys:: stat:: Mode :: empty ( ) ,
448448 ) ?;
449- let filetable = unsafe { OwnedFd :: from_raw_fd ( fd) } ;
450449 let read_one = || -> nix:: Result < _ > {
451450 let mut byte = 0 ;
452- let n = nix:: unistd:: read ( filetable. as_raw_fd ( ) , std:: slice:: from_mut ( & mut byte) ) ?;
451+ let n = nix:: unistd:: read ( & filetable, std:: slice:: from_mut ( & mut byte) ) ?;
453452 Ok ( ( n > 0 ) . then_some ( byte) )
454453 } ;
455454 while let Some ( c) = read_one ( ) ? {
You can’t perform that action at this time.
0 commit comments