-
Notifications
You must be signed in to change notification settings - Fork 814
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tty device timestamps are not meaningful #545
Comments
The answer to that question appears to be look for "Microsoft" in the output of /proc/version. But that doesn't appear in the output of |
I'd suggest using /proc/sys/kernel/osrelease which will be "3.4.0-Microsoft" I didn't see anything Microsoft-specific in any of the uname -a output. I'll take a look at why the tty stat call is always returning the current time. |
microsoft/WSL#545 Just looking for "Mirosoft" is rather general - we don't want to enforce this strange behavior for Windows 12 (or the next beta.)
microsoft/WSL#545 Just looking for "Mirosoft" is rather general - we don't want to enforce this strange behavior for Windows 12 (or the next beta.)
I was interested in solving a problem with the fish shell so I did some debugging. It appears that the timestamps in the
struct stat
returned byfstat(1,...)
are always the current time. Both on Cygwin and WSL. The workaround for Cygwin is to disable the check of those timestamps based on the definition of macros such as_WIN32
. Those conditional checks don't work on WSL.How can I test, at compile time, that the program is targeted for WSL? If that isn't possible how do I test at run time that the program is running under WSL?
The text was updated successfully, but these errors were encountered: