Web lists-archives.com

Re: how to access and display apps that I've launched




On 2017-07-25 15:48, Ian Lambert via cygwin wrote:
> --------------------------------------------
> On Tue, 7/25/17, Brian Inglis <> wrote:
> 
>  Subject: Re: how to access and display apps that I've launched
>  To: cygwin
>  Date: Tuesday, July 25, 2017, 3:57 PM
>  
>  On 2017-07-25 12:16, Achim Gratz
>  wrote:
>  > Brian Inglis writes:
>  >> rebaselst uses touch -t 7001010000 ...
>  - could be patched to 197001010000.
>  > 
>  > Could be, but touch is specified to assume
>  "19" yhen YY=70 by POSIX, AFAIK.
>  > 
>  >> Is this affected
>  by locale and by Windows regional date settings in
>  Control
>  >> Panel/Region/Formats
>  tab/Additional settings... button/Date tab/Calendar
>  >> group/When a two-digit year is
>  entered, interpret it as a year between
>  >> |(nnnn-99)| and [nnnn ^v] with the
>  default values |1980| and [2079 ^v] i.e. from
>  >> the start of the DOS epoch which
>  postdates the Unix epoch 19700101, and could
>  >> cause 70 to be interpreted as 2070.
>  > 
>  > That would be
>  surprising since the expectation really is UNIX epoch
>  when
>  > we're talking about Cygwin. 
>  In any case, the OP should easily be able
>  > to test this at the shell prompt.
>  
>  I know POSIX says and my tests
>  on current releases verify 1969-99, 2000-68, but
>  could this be thrown off by localization
>  interfering in some cases, as was
>  /proc/loadavg, because a function started using
>  locales?
>  These files and related functions
>  do not seem candidates to be affected by the
>  recent patch for ls problems with symlinks, so
>  BLODA blocking pre-1980 times?
> 
> = = =
> 
> There is a change to "invalid argument" 
> somewhere from 1980 to 1979, 
> but it also involves permissions.
> Permission denied comes from the chmod 444 in /bin/rebaselst
> I think. Otherwise with write permission touch gives invalid argument.
> Either way, it changes the files to current date-time,
> not an earlier time, when it fails.
> 
> 
> $ for f in * ; do echo $f ; touch -t 198001010000 $f ; done
> fullrebase.done
> rebase_all
> rebase_dyn
> rebase_exe
> rebase_lst
> rebase_pkg
> rebase_user
> rebase_user_exe
> 
> $ for f in * ; do echo $f ; touch -t 197901010000 $f ; done
> fullrebase.done
> touch: setting times of 'fullrebase.done': Invalid argument
> rebase_all
> touch: setting times of 'rebase_all': Invalid argument
> rebase_dyn
> touch: cannot touch 'rebase_dyn': Permission denied
> rebase_exe
> touch: cannot touch 'rebase_exe': Permission denied
> rebase_lst
> touch: cannot touch 'rebase_lst': Permission denied
> rebase_pkg
> touch: cannot touch 'rebase_pkg': Permission denied
> rebase_user
> touch: cannot touch 'rebase_user': Permission denied
> rebase_user_exe
> touch: cannot touch 'rebase_user_exe': Permission denied
> 
> The "bad" part of strace of a file with write permission is:
> 
>  3524 fhandler_base::utimens_fs: incoming lastaccess 0x10EDB8D0 0x0
>    86  285905 [main] touch 3524 seterrno_from_nt_status: /home/corinna/src/cygwin/cygwin-2.8.2/cygwin-2.8.2-1.x86_64/src/newlib-cygwin/winsup/cygwin/fhandler_disk_file.cc:1385 status 0xC000000D -> windows error 87
>    30  285935 [main] touch 3524 geterrno_from_win_error: windows error 87 == errno 22
>    22  285957 [main] touch 3524 futimens: -1 = futimens(0, 0xFFFFC950)
>    22  285979 [main] touch 3524 close: close(0)
>    23  286002 [main] touch 3524 fhandler_base::close: closing '/var/cache/rebase/rebase_all' handle 0x240
>   178  286180 [main] touch 3524 close: 0 = close(0)
> touch  558  286738 [main] touch 3524 write: 5 = write(2, 0xFFFFCC50, 5)
> :   47  286785 [main] touch 3524 write: 1 = write(2, 0x180229941, 1)
>     45  286830 [main] touch 3524 write: 1 = write(2, 0x180229935, 1)
> setting times of   116  286946 [main] touch 3524 write: 17 = write(2, 0x100414923, 17)
> 'rebase_all'   38  286984 [main] touch 3524 write: 12 = write(2, 0x10041C080, 12)
> :   106  287090 [main] touch 3524 write: 2 = write(2, 0x180229945, 2)
> Invalid argument   41  287131 [main] touch 3524 write: 16 = write(2, 0x180229C60, 16)
> 
>   189  287320 [main] touch 3524 write: 1 = write(2, 0x1801FC9A7, 1)
>   184  287504 [main] touch 3524 close: close(1)
>    18  287522 [main] touch 3524 fhandler_base::close: closing '' handle 0x204
>    17  287539 [main] touch 3524 close: 0 = close(1)
>   211  287750 [main] touch 3524 close: close(2)
>    19  287769 [main] touch 3524 fhandler_base::close: closing '' handle 0x200
>    24  287793 [main] touch 3524 close: 0 = close(2)
>   177  287970 [main] touch 3524 do_exit: do_exit (256), exit_state 1
>    25  287995 [main] touch 3524 void: 0x0 = signal (20, 0x1)
>    19  288014 [main] touch 3524 void: 0x0 = signal (1, 0x1)

Unless you are on some FAT or other legacy filesystem that might object to dates
before 1980, or some GPO, bettin' bleedin' BLODA!

On my W10 64 NTFS filesystem:

$ touch -t 190001010000 t
$ ls -glo t
-rw-r--r--+ 1 0 Jan  1  1900 t
$ stat t
  File: t
  Size: 0               Blocks: 0          IO Block: 65536  regular empty file
Device: eaa11ae0h/3936426720d   Inode: 7599824371819426  Links: 1
Access: (0644/-rw-r--r--)  Uid: (######/   xxx)   Gid: (  545/   Users)
Access: 1900-01-01 00:00:00.000000000 -0733
Modify: 1900-01-01 00:00:00.000000000 -0733
Change: 2017-07-25 18:03:17.352280200 -0600
 Birth: 2017-07-24 22:43:38.229619000 -0600

even uses 1900 LMT from TZ.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple