public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
To: cygwin@cygwin.com
Subject: Re: how to access and display apps that I've launched
Date: Wed, 26 Jul 2017 10:28:00 -0000	[thread overview]
Message-ID: <03e53d7a-e2ce-f55d-4015-2b267a2d6081@SystematicSw.ab.ca> (raw)
In-Reply-To: <1036849022.821922.1501019281615@mail.yahoo.com>

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

  reply	other threads:[~2017-07-26  0:09 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1036849022.821922.1501019281615.ref@mail.yahoo.com>
2017-07-26  9:50 ` Ian Lambert via cygwin
2017-07-26 10:28   ` Brian Inglis [this message]
     [not found] <1128827672.1514648.1501092281786.ref@mail.yahoo.com>
2017-07-27 16:01 ` Ian Lambert via cygwin
     [not found] <1534921570.1524318.1501093009415.ref@mail.yahoo.com>
2017-07-27 14:49 ` Ian Lambert via cygwin
     [not found] <685307372.1339085.1501078785472.ref@mail.yahoo.com>
2017-07-26 17:09 ` Ian Lambert via cygwin
2017-07-26 17:13   ` Ken Brown
2017-07-26 18:27     ` Brian Inglis
2017-07-27  2:38   ` Achim Gratz
     [not found] <799230527.525007.1500998733401.ref@mail.yahoo.com>
2017-07-25 18:21 ` Ian Lambert via cygwin
2017-07-25 21:52   ` Achim Gratz
2017-07-26  6:49   ` Ken Brown
     [not found] <1438727230.474852.1500993486132.ref@mail.yahoo.com>
2017-07-25 18:12 ` Ian Lambert via cygwin
2017-07-25 18:16   ` Ken Brown
2017-07-25 19:57   ` Achim Gratz
     [not found] <1783227004.4348461.1500934105434.ref@mail.yahoo.com>
2017-07-24 22:49 ` Ian Lambert via cygwin
2017-07-25  0:03   ` mike
2017-07-25  4:27   ` Ken Brown
2017-07-25  4:55     ` Ian Lambert via cygwin
2017-07-25 15:06       ` Ken Brown
2017-07-25  5:21     ` Brian Inglis
2017-07-25 10:17       ` Brian Inglis
2017-07-25 11:57       ` Brian Inglis
2017-07-25 13:03       ` Brian Inglis
2017-07-25 14:13       ` Brian Inglis
2017-07-25 19:19       ` Achim Gratz
2017-07-26  8:16         ` Brian Inglis
2017-07-25 19:01     ` Achim Gratz
     [not found] <472748733.4076472.1500916852092.ref@mail.yahoo.com>
2017-07-24 19:46 ` Ian Lambert via cygwin
     [not found] <949225432.4024000.1500912514455.ref@mail.yahoo.com>
2017-07-24 18:07 ` Ian Lambert via cygwin
2017-07-24 20:22   ` Ken Brown
2017-07-23 14:25 mike
2017-07-23 17:39 ` Jack
2017-07-23 18:14   ` mike
2017-07-23 19:18     ` Brian Inglis
2017-07-23 19:46       ` mike
2017-07-24 17:31         ` Brian Inglis
2017-07-25  2:16           ` mike
2017-07-23 22:46 ` Ken Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=03e53d7a-e2ce-f55d-4015-2b267a2d6081@SystematicSw.ab.ca \
    --to=brian.inglis@systematicsw.ab.ca \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).