Age | Commit message (Collapse) | Author |
|
- The recent commit "Cygwin: pty: Add missing input transfer when
switch_to_pcon_in state." causes regression that rlwrap cannot
work with cmd.exe. This patch fixes the issue.
|
|
- The recent commit: "Cygwin: pty: Fix Ctrl-C handling for non-cygwin
apps in background." causes the problem that cmd.exe is terminated
by Ctrl-C even if it is running in pseudo console. This patch fixes
the issue.
|
|
- Set blocking mode properly at startup of cygwin process. This is
needed if the cygwin process is executed from non-cygwin process.
|
|
|
|
Remove references to STATUS_THREAD_SIGNALED and
STATUS_THREAD_CANCELED, which can't occur any more.
|
|
- With this patch, FILE_SYNCHRONOUS_IO_NONALERT flag is applied to
the read pipe so that native C# programs work with cygwin pipe.
To handle signals in reading pipe with this flag set, the read
pipe itself is always set to nonblocking mode and simulates the
blocking behaviour in raw_read().
- Default to byte mode rather than message mode in order to make
C# programs work with cygwin pipe.
Addresses: https://cygwin.com/pipermail/cygwin/2021-March/247987.html
|
|
- If the non-cygwin app is started in the background in console, the
console mode is broken for the app. This patch fixes the issue.
|
|
- If the non-cygwin app is started in the background in pseudo
console, the console mode is broken for the app. This patch fixes
the issue.
|
|
- With pseudo console enabled, if the non-cygwin app is started in
the background and put it into the foreground, the process cannot
be stopped by Ctrl-C. This patch fixes the issue.
|
|
- This patch fixes the bug that input is wrongly sent to io_handle_nat
rather than io_handle when neither read() nor select() is called
after the cygwin app is started from non-cygwin app. This happens
only if psuedo console is disabled.
Addresses:
https://cygwin.com/pipermail/cygwin-patches/2021q4/011587.html
|
|
|
|
- The last change in path.cc introduced a bug that causes an error
when accessing a virtual drive which mounts UNC path such as
"\\server\share\dir" rather than "\\server\share". This patch
fixes the issue.
|
|
- When symlink_info::check() is called with the path having drive
letter and UNC path is mounted to the drive, the path is replaced
with UNC path. With this patch, UNC path prefix is converted back
to drive letter. This fixes the issue:
https://cygwin.com/pipermail/cygwin/2021-November/250087.html
https://cygwin.com/pipermail/cygwin/2021-December/250103.html
|
|
- Fix a bug in fhandler_dev_clipboard::read() that the second read
fails with 'Bad address'.
Addresses:
https://cygwin.com/pipermail/cygwin/2021-December/250141.html
|
|
Rather than special case status code 0xc00004b3, add status and matching
error code to ntdll.h and handle it as part of the standard error mapping.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
- Currently, some OSC escape sequences, such as 'OSC 110 BEL', are
not handled correctly. This patch fixes the issue.
|
|
To keep getrlimit/setrlimit clean, move the RLIMIT_AS code into
local static functions __set_rlimit_as and __get_rlimit_as.
Also, make adding process to the job the last step, to be able to
close and release the job resources if anything failed. Add matching
comment.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
If the incoming soft limit is less restrictive than the current
hard limit, bail out with EPERM. Given the previous sanity check,
this implies trying to raise the hard limit. While, theoretically,
this should be allowed for privileged processes, Windows has no
matching concept in terms of job limits
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
...just to see what it's used for.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
Code based on the idea implemented by the oneTBB project,
see https://github.com/oneapi-src/oneTBB
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
NtReadFile can return STATUS_PENDING occasionally even in non-blocking
mode. Check for this and wait for NtReadFile to complete. To avoid
code repetition, do this in a static helper function nt_read.
|
|
Slightly rearrange the code to avoid returning without closing the
event handle.
|
|
- Removes the bug fix entry that was accidentally added to the
release notes 3.3.3, even though it had been already fixed in
3.3.2.
|
|
- If sig_send() is called while another thread is processing exit(),
race issue regarding exit_state may occur. This patch fixes the
issue.
|
|
https://cygwin.com/pipermail/cygwin/2021-November/249930.html
reported a regression introduce by using a dynamically sized local
char array in favor of a statically sized array.
Fix this by reverting to a statically sized array, using a small
buffer on the stack for a reasonable number of requested digits, a
big mallocated buffer otherwise. This should work for small targets
as well, given that malloc is used in printf anyway right now.
This is *still* hopefully just a temporary measure, unless somebody
actually provides a new ldtoa.
Fixes: 4d90e53359145 ("ldtoa: fix dropping too many digits from output")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
raise(2) on Linux returns the same values and sets errno
independent of calling kill(2) or pthread_kill(3). Align
code to behave the same.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
The check for the pthread self pointer in TLS is misleading,
given the main thread has this pointer initialized as well.
Check for the global __isthreaded flag as well.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
Add debug output for errors when calling WNet functions.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
- This patch fixes the issue that process sometimes hangs for 60
seconds with the following scenario.
1) Open command prompt.
2) Run "c:\cygwin64\bin\bash -l"
3) Compipe the following source with mingw compiler.
/*--- Begin ---*/
#include <stdio.h>
int main() {return getchar();}
/*---- End ----*/
4) Run "tcsh -c ./a.exe"
5) Hit Ctrl-C.
|
|
- This patch fixes the issue that ReadConsoleInputW() call in the
master thread interferes with the input process of non-cygwin apps.
|
|
- Call set_pipe_non_blocking(false) only if the pipe will be really
inherited to non-cygwin process.
|
|
- Fix incorrect description of the bug fixes part.
|
|
- NtReadFile() and NtWriteFile() seems to return STATUS_PENDING
occasionally even in nonblocking mode. This patch adds handling
for STATUS_PENDING in nonblocking mode.
Addresses:
https://cygwin.com/pipermail/cygwin/2021-November/249910.html
|
|
The file attributes after creating a file are not necessarily
identical to the attributes we passed as argument to NtCreateFile.
This results in subsequent operations like fchmod or facl to
set the DOS file attributes to unexpected values.
The fix is to request file attributes from the OS after file creation
and cache those.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
This reverts commit 2b28977149b1e8858b597890906f21cdecde84ce.
This patch fixes the symptoms, but not the actual problem. Revert
and try again.
|
|
When running Cygwin's Bash in the Windows Terminal (see
https://docs.microsoft.com/en-us/windows/terminal/ for details), Cygwin
is receiving keyboard input in the form of UTF-16 characters.
UTF-16 has that awkward challenge that it cannot map the full Unicode
range, and to make up for it, there are the ranges U+D800-U+DBFF and
U+DC00-U+DFFF which are illegal except when they come in a pair encoding
for Unicode characters beyond U+FFFF.
Cygwin does not handle such surrogate pairs correctly at the moment, as
can be seen e.g. when running Cygwin's Bash in the Windows Terminal and
then inserting an emoji (e.g. via Windows + <dot>, which opens an emoji
picker on recent Windows versions): Instead of showing an emoji, this
shows the infamous question mark in a black triangle, i.e. the invalid
Unicode character.
Let's special-case surrogate pairs in this scenario.
This fixes https://github.com/git-for-windows/git/issues/3281
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
|
|
Use the same name as glibc & gnulib to indicate "newlib itself is
being compiled". This also harmonizes the codebase a bit in that
_LIBC was already used in places instead of _COMPILING_NEWLIB.
Building for bfin-elf, mips-elf, and x86_64-pc-cygwin produces
the same object code.
|
|
Do this for normal files and symlinks, not for temporary files,
device files or unix sockets.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
A recent change in binutils marks the .gnu_debuglink_overlay section
as debug section. When dllfixdbg calls objcopy -g, the section
is removed and the --add-gnu-debuglink option on the same command line
appends the section consequentially at the end of the sections.
This in turn breaks Windows Version info and, potentially, raising
the cygheap size at runtime.
Fix this by adding an explicit --keep-section=.gnu_debuglink_overlay
to the objcopy command line.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
isabspath handles a path "X:", without trailing slash or backslash,
as absolute path. This breaks some scenarios with relative paths
starting with "X:". For instance, fstatat will mishandle a call
with valid dirfd and "c:" as path.
The reason is that gen_full_path_at() will check for isabspath("C:")
which returns true. So the path will be used verbatim in fstatat,
rather than being converted to a path "<dirfd-path>/c:".
So, introduce isabspath_strict, which returns true for paths starting
with "X:" only if the next char is actually a slash or backslash.
Use it from gen_full_path_at().
This still fixes only half the problem. The right thing would have been
to disallow using DOS paths in the first place. Unfortunately it's much
too late for that.
Addresses: https://cygwin.com/pipermail/cygwin/2021-November/249837.html
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
- Currently, raw_write() fails to handle size zero pipe which may
be created by non-cygwin apps (e.g. Windows native ninja). This
patch fixes the issue.
Addresses:
https://cygwin.com/pipermail/cygwin/2021-November/249844.html
|
|
This logic has never been used as we don't define _LIBC and the
reentrant.h header doesn't exist, so delete it all.
|
|
- Add missing handling for WAIT_CANCELED in cygwait() for read_mtx
in raw_read().
|
|
- If output of C# program is redirected to pipe, pipe reader falsely
detects EOF. This happens after overhaul of pipe implementation.
This patch fixes the issue.
Addresses:
https://cygwin.com/pipermail/cygwin/2021-November/249777.html
|
|
Cygwin always requests FILE_WRITE_ATTRIBUTES permissions when trying to
change DAC information. This can lead to permission problems when
trying to chmod/chown files on Samba shares. Drop requesting
FILE_WRITE_ATTRIBUTES on Samba shares and go with WRITE_DAC/WRITE_OWNER
only.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|