@@ -206,14 +206,16 @@ public static BigInteger geteuid() {
206206 [ SupportedOSPlatform ( "linux" ) ]
207207 [ SupportedOSPlatform ( "macos" ) ]
208208 private static void utimeUnix ( string path , long atime_ns , long utime_ns ) {
209- var atime = new Timespec ( ) ;
210- atime . tv_sec = atime_ns / 1_000_000_000 ;
211- atime . tv_nsec = atime_ns % 1_000_000_000 ;
212- var utime = new Timespec ( ) ;
213- utime . tv_sec = utime_ns / 1_000_000_000 ;
214- utime . tv_nsec = utime_ns % 1_000_000_000 ;
215-
216- if ( Syscall . utimensat ( Syscall . AT_FDCWD , path , new [ ] { atime , utime } , 0 ) == 0 ) return ;
209+ var atime = new Timespec {
210+ tv_sec = atime_ns / 1_000_000_000 ,
211+ tv_nsec = atime_ns % 1_000_000_000
212+ } ;
213+ var utime = new Timespec {
214+ tv_sec = utime_ns / 1_000_000_000 ,
215+ tv_nsec = utime_ns % 1_000_000_000
216+ } ;
217+
218+ if ( Syscall . utimensat ( Syscall . AT_FDCWD , path , [ atime , utime ] , 0 ) == 0 ) return ;
217219 throw GetLastUnixError ( path ) ;
218220 }
219221
@@ -225,6 +227,13 @@ private static void killUnix(int pid, int sig) {
225227 throw GetLastUnixError ( ) ;
226228 }
227229
230+
231+ [ SupportedOSPlatform ( "linux" ) ]
232+ [ SupportedOSPlatform ( "macos" ) ]
233+ private static bool isattyUnix ( int fd ) {
234+ return Syscall . isatty ( fd ) ;
235+ }
236+
228237#endif
229238 }
230239}
0 commit comments