Commit Graph

27 Commits

Author SHA1 Message Date
Corinna Vinschen f69b2421bb Cygwin: add strtold fix to release message
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-12-16 16:39:17 +01:00
Corinna Vinschen 29ba52da95 Cygwin: ilogbl: Make sure to return FP_ILGB0 on zero input
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-12-16 10:50:17 +01:00
Ken Brown 69772c4332 Cygwin: document the last bugfix 2019-12-10 08:45:17 -05:00
Mark Geisert 04d85dea57 Cygwin: Doc change to note stackdump limit patch 2019-11-08 10:23:08 +01:00
Corinna Vinschen 44432b93ad Cygwin: document console helper patch
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-11-05 11:57:32 +01:00
Corinna Vinschen 57640bee75 Cygwin: fix process parent/child relationship after execve
Commit 5a0f2c00aa "Cygwin: fork/exec: fix child process permissions"
removed the PROCESS_DUP_HANDLE handle permission of the parent process
handle in the child to avoid a security problem.

It turned out that this broke the following scenario: If a process forks
and then the parent execs, the child loses the ability to register the
parent's death.  To wit, after the parent died the child process does
not set its own PPID to 1 anymore.

The current exec mechanism copies required handle values (handles to
keep contact to the child processes) into the child_info for the
about-to-be-exec'ed process.  The exec'ed process is supposed to
duplicate these handles.  This fails, given that we don't allow the
exec'ed process PROCESS_DUP_HANDLE access to the exec'ing process since
commit 5a0f2c00aa.

The fix is to avoid the DuplicateHandle calls in the exec'ed process.

This patch sets the affected handles to "inheritable" in the exec'ing
process at exec time.  The exec'ed process just copies the handle values
and resets handle inheritance to "non-inheritable".  The exec'ing
process doesn't have to reset handle inheritance, it exits after setting
up the exec'ed process anyway.

Testcase: $ ssh-agent /bin/sleep 3

ssh-agent forks and the parent exec's sleep.  After sleep exits, `ps'
should show ssh-agent to have PPID 1, and eventually ssh-agent exits.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-11-02 19:55:24 +01:00
Ken Brown b61dc22ada Cygwin: spawnvp, spawnvpe: fail if executable is not in $PATH
Call find_exec with the FE_NNF flag to enforce a NULL return when the
executable isn't found in $PATH.  Convert NULL to "".  This aligns
spawnvp and spawnvpe with execvp and execvpe.
2019-10-18 10:38:52 -04:00
Ken Brown c561a625af Cygwin: mkdir and rmdir: treat drive names specially
If the directory name has the form 'x:' followed by one or more
slashes or backslashes, and if there's at least one backslash, assume
that the user is referring to 'x:\', the root directory of drive x,
and don't strip the backslash.

Previously all trailing slashes and backslashes were stripped, and the
name was treated as a relative file name containing a literal colon.

Addresses https://cygwin.com/ml/cygwin/2019-08/msg00334.html.
2019-10-07 16:09:41 -04:00
Ken Brown e82a0c959a Cygwin: document recent changes to format_proc_cpuinfo 2019-10-07 16:06:28 -04:00
Ken Brown 6061f9c76f Document the last bug fix 2019-09-27 13:36:45 -04:00
Ken Brown a9724c3904 Document the last change 2019-09-24 20:04:28 -04:00
Ken Brown bbc625da81 Cygwin: document last change 2019-09-15 13:40:12 -04:00
Corinna Vinschen 483fb49ea0 Cygwin: add W10 pseudo console support to release notes
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-08-29 13:56:43 +02:00
Corinna Vinschen b7399d5e6f Revert "Cygwin: fix potential SEGV in sigwaitinfo/signalfd scenario"
This reverts commit 92115a83a4.

This was utterly wrong.
2019-08-17 10:12:16 +02:00
Corinna Vinschen 92115a83a4 Cygwin: fix potential SEGV in sigwaitinfo/signalfd scenario
On sigwaitinfo or reading from a signalfd, signal processing sets up
signal handling via sigdelayed even if the handler address is NULL.
This doesn't have any impact on sigwaitinfo scenarios (or at least, I
wasn't able to come up with a reproducer) but it breaks signalfd
scenarios, where eventually a call to call_signal_handler from
sigdelayed will try to call the NULL function.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-08-13 12:21:05 +02:00
Corinna Vinschen 449e9a73d1 Cygwin: add missing bugfix release messages for 3.1.0
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-08-09 17:47:55 +02:00
Mark Geisert 362b98b49a Cygwin: Implement CPU_SET(3) macros
This patch supplies an implementation of the CPU_SET(3) processor
affinity macros as documented on the relevant Linux man page.

There is a mostly superset implementation of cpusets under newlib's
libc/sys/RTEMS/include/sys that has Linux and FreeBSD compatibility
and is built on top of FreeBSD bitsets.  This Cygwin implementation
and the RTEMS one could be combined if desired at some future point.
2019-08-05 13:22:04 +02:00
Corinna Vinschen a13145a30d Cygwin: Export newlib ndbm functions
Signed-off-by: Corinna Vinschen <corinna-cygwin@cygwin.com>
2019-07-24 22:32:48 +02:00
Corinna Vinschen bae987be12 Cygwin: sigpending: don't report pending signals for other threads
The sigpending mechanism failed to check if the pending signal was a
process-wide signal, or a signal for the curent thread.  Fix that by
adding a matching conditional to wait_sig's __SIGPENDING code.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-07-12 17:27:26 +02:00
Ken Brown 3dcc10ec90 Tweak release message 2019-06-25 16:38:39 -04:00
Ken Brown 9604a251bd Cygwin: timerfd: avoid a deadlock
Add a function timerfd_tracker::enter_critical_section_cancelable,
which is like enter_critical_section but honors a cancel event.  Call
this when a timer expires while the timerfd thread is in its inner
loop.  This avoids a deadlock if timerfd_tracker::dtor has entered its
critical section and is trying to cancel the thread.  See
https://cygwin.com/ml/cygwin/2019-06/msg00096.html.
2019-06-25 15:44:43 -04:00
Mark Geisert 641ecb0753 Cygwin: Implement sched_[gs]etaffinity()
This patch set implements the Linux syscalls sched_getaffinity,
sched_setaffinity, pthread_getaffinity_np, and pthread_setaffinity_np.
Linux has a straightforward view of the cpu sets used in affinity masks.
They are simply long (1024-bit) bit masks.  This code emulates that view
while internally dealing with Windows' distribution of available CPUs among
processor groups.
2019-06-24 09:18:14 +02:00
Corinna Vinschen ad101bcb0f Rename <xlocale.h> back to <sys/_locale.h>
libX11 provides <X11/Xlocale.h>.  The build of libX11 itself adds
include/X11 to the compiler's include path.  This results in a name
collision with /usr/include/xlocale.h on case-insensitive filesystems.

Commit 90e35b1eb3 renamed sys/_locale.h to xlocale.h in March 2017 under
the assumption that we should provide the locale_t type in the same file
as on Linux, FreeBSD, and Darwin.

A few weeks later (June 2017), glibc removed the xlocale.h file in favor
of bits/types/locale_t.h, which shouldn't be included directly anyway.

For reference and the reasoning, see
https://sourceware.org/git/?p=glibc.git;a=commit;h=f0be25b6336d

Given the above, revert 90e35b1eb3 and
fix additional usage of xlocale.h.
2019-06-14 10:02:08 +02:00
Corinna Vinschen f527171a93 Cygwin: define MSG_EOR and refuse in send(2)
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-04-25 19:00:08 +02:00
Corinna Vinschen f0ea836b75 Cygwin: add latest signal handling fixes to release notes
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-04-06 18:09:41 +02:00
Corinna Vinschen de3c82ee6d Cygwin: Add console patches to release notes
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-03-31 19:37:55 +02:00
Ken Brown 298581868a Cygwin: document the recent FIFO changes 2019-03-27 19:47:59 +01:00