Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
- Variable remlen stores the return value of QueryDosDeviceW(), so
it is better to be DWORD.
|
|
- If UNC path for DFS is mounted to a drive with drive letter, the
error "Too many levels of symbolic links" occurs when accessing
to that drive. This is because GetDosDeviceW() returns unexpected
string such as "\Device\Mup\DfsClient\;Z:000000000003fb89\dfsserver
\dfs\linkname" for the mounted UNC path "\??\UNC\fileserver\share".
This patch adds a workaround for this issue.
Addresses: https://cygwin.com/pipermail/cygwin/2022-March/250979.html
|
|
- Unlike linux, fsync() calls FlushFileBuffers() even for special
files. This causes the problem reported in:
https://cygwin.com/pipermail/cygwin/2022-March/251022.html
This patch fixes the issue.
|
|
Rather than define per-object rules in the Makefile, have small files
that define & include the right content. This simplifies the build
rules, and makes understanding the source a little easier (imo) as it
makes all the subdirs behave the same: you have 1 source file and it
produces 1 object. It's also about the same amount of boiler plate,
without having to define custom build rules that can fall out of sync.
We also realign the free & pvalloc definitions: common code puts these
in malloc.o & valloc.o respectively, not in free.o & pvalloc.o objects.
This will also be important as we merge the libc.a build into the top
dir since it relies on a single flat list of objects for overrides.
|
|
Move the multiplex logic out of the build and into source files to
make the build rules a lot simpler.
|
|
The mallopt symbol is defined in tiny-malloc.c, not mallocr.c, but
the Makefile in here tries to compile it out of the latter. This
leads to mallopt never being defined.
The build also creates mallinfo.o & mallopt.o & mallstats.o objects
to override common ones, but the common dir doesn't use these names.
Instead, it places these all in mstats.o.
So move the build define logic to a dedicated file and compile it
directly to make things a bit simpler while fixing the missing func
and aligning objects with the cmomon code.
|
|
- After the commit "Cygwin: pty, console: Fix handle leak which
occurs on exec() error.", startxwin cannot start X due to the
error "Failed to activate virtual core keyboard: 2". The problem
is access violation in the code retrieving the pgid of the ctty.
This patch fixes the issue.
Addresses: https://cygwin.com/pipermail/cygwin/2022-March/251013.html
|
|
Rather than define per-object rules in the Makefile, have small files
that define & include the right content. This simplifies the build
rules, and makes understanding the source a little easier (imo) as it
makes all the subdirs behave the same: you have 1 source file and it
produces 1 object. It's also about the same amount of boiler plate,
without having to define custom build rules that can fall out of sync.
This will also be important as we merge the libc.a build into the top
dir since it relies on a single flat list of objects for overrides.
Also take the opportunity to clean up the unnecessary header deps in
here. Automake provides dependency generation for free now.
|
|
Some awk implementations such as old versions of mawk do not support the
length() function. Use the return value of the POSIX split() function instead.
|
|
This file is a little confusing: it provides all of the mallocr logic,
but is compiled multiple times to produce a unique symbol each time.
For example, building mallocr.c with -DDEFINE_FREER produces freer.o
that only defines _free_r(). This is fine for most symbols, but it's
a little confusing when defining mallocr itself -- we produce a file
with the same symbol name, but we still need -DDEFINE_MALLOCR. In
order to move the logic from the build rules to source files, using
mallocr.c both as a multiplexer and for defining a single symbol is a
bit tricky. It's possible (if we add a lot of redundant preprocessor
checks to mallocr.c, or we add complicated build flags just for this
one files), but it's easier if we simply rename this to a dedicated
file. So let's do that.
We do this as a dedicated commit because the next one will create a
new mallocr.c file and git's automatic diff algorithms can handle
trivial renames, but it can't handle renames+creates in the same
commit.
|
|
Simplify the build system logic a bit by moving the mallocr.c ->
nano-mallocr.c redirection from the Makefile to the source files.
This allows for consistent object name usage regardless of the
configuration options used in case a machine dir wants to define
its own override.
|
|
- apply fix from Tom de Vries <vries@gcc.gnu.org>
to have calloc zero out storage for nvptx calloc function
|
|
|
|
|
|
- Generally, '\n' is called "line feed" (not "new line"), so the
variable name p_nl has been changed to p_lf.
|
|
|
|
- Currently, individual CR or NL is treated as line feed in
accept_input() and transfer_input(). This patch takes account
of CR+NL as well.
|
|
- Currently, tty::pcon_start flag is cleared before transfer_input()
in master::write(), however, the code in setup_pseudoconsole()
waits for transfer_input() using tty::pcon_start. This possibly
causes the race issue. The patch fixes this potential issue.
|
|
|
|
- This patch removes the old code which calls transfer_input() but
is no longer needed. These code was necessary indeed in the past,
however, as a result of recent frequent code changes, it is no
longer needed.
|
|
- Previously, reset_switch_to_nat_pipe() is called from many places
in pty code. This patch reorganizes that. With this patch, it is
called only from bg_check() and setpgid_aux(). The calls which
does not have enough reason have been omitted.
|
|
- To make read() work properly in canonical mode, writing to the pty
pipe should be done line by line. However, only CR was treated as
line separator previously in transfer_input(). This patch fixes
the issue.
|
|
Seems that some versions of texinfo require the @menu to have all
entries at the top level, so add the new build one to it.
|
|
- Previously, the PID_NEW_PG flag was also used as a marker for GDB
with non-cygwin inferior, unlike its original meaning. With this
patch, the condition exec_dwProcessId == dwProcessId is used as a
marker for that instead.
|
|
- This patch omits the unnecessary code path for setup for GDB.
|
|
- The function nat_pipe_owner_alive() is used even for the process
which is not a nat pipe owner, so, it is renamed to process_alive().
|
|
glibc getconf doesn't print "undefined" for undefined values
in -a output. It just prints the empty string. Do it the
same way.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
We return -1 with errno set to EINVAL for sysconf options for
values required by POSIX, but not implemented on Cygwin.
This is incorrect. Return -1, but don't set errno for these options.
Drop the "nsup" enum to indicate unsupported values, it's not
required anymore.
Fixes: 59e3b6ca7dc10 (CVS import)
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
When adding the timer_getoverrun function, DELAYTIMER_MAX was added
to limits.h, but the return value of sysconf(_SC_DELAYTIMER_MAX) wasn't
changed accordingly. Fix that now.
Fixes: 9e295a8d193e ("Cygwin: posix timers: implement timer_getoverrun")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
- transfer_input() function uses console api, so it should be guarded
by attach_mutex. However, in most cases, it is missing. This patch
fixes the issue.
|
|
- This patch communalizes the code for attaching another console
temporarily and resuming to the original attach state, because
there were a plurality of similar codes throughout.
|
|
- This patch revises the acquiring/releasing timing for attach_mutex
to make the period in which it is being acquired shorter. Further,
acquiring/releasing are added to where they are missing but needed.
|
|
Request __SIGPENDINGALL, not __SIGPENDING, when fetching signal info
for the calling process.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
|
|
Since we already set up _LIBC to indicate source files are building
for newlib, we don't need this malloc-specific symbol. Convert it
over to simplify the build a bit.
|
|
This is already called earlier in this file, so no need to do it again.
|
|
Avoid a recursive make to speed things up a bit.
This drops the header install logic because the lm32/ subdir doesn't
actually have any header files to install.
|
|
It's functionally the same, but the configure.ac code is simpler and
less boiler plate duplicated.
|
|
- There was a potential risk to drop special key processing when
process_input_messsage() is called intermittently. This patch
fixes the issue.
|
|
- In fhandler_console::cons_master_thread(), a struct which has
only a static function is used. In this case, struct instance
is not necessary. So with this patch, the static function is
invoked without creating instance.
|
|
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
So far the values of SigPnd and SigBlk were always 0 and SigIgn
was incorrectly set to the block mask of the current thread of
the calling process.
Fix that by adding a _pinfo::siginfo method and a PICOM_SIGINFO
message to allow to request actual signal info of any running process.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
Add a signal __SIGPENDINGALL to allow computing the mask of all
currently pending signals.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
Add method to compute process-wide signal block mask
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
--extra is deprectated, use --extras
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
The "how" value only makes sense if a new set is given. If we
only read the current signal set, ignore the value of "how" per
POSIX:
"If set is a null pointer, the value of the argument how is not
significant"
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
The format specifier used for the signal masks is incorrectly
assuming 32 bit values. Fix it.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
- With this patch, some pty functions/variables have been renamed
so that the name *pcon* is not used for those that are called
even when the pseudo console is not active.
|
|
sysconf incorrectly sets errno to EINVAL for _SC_TZNAME_MAX.
Don't do that.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|