| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch addresses an issue whereby the window of
a process created with CreateProcess fails to come
to the foreground.
This occurs when the calling process itself hasn't run any
Windows event processing loop. A repro test case is to make a
program with a main, and and call CreateProcess to spawn
calc.exe or notepad.exe before doing anything else.
It turns out that a dummy call to TranslateMessage makes this
issue goes away. If such a call is made before CreateProcess,
then the spawned process' window comes up in the foreground
as expected.
* winsup/cygwin/Makefile.in (DLL_IMPORTS): We need to link
in user32.dll to call TranslateMessage. Condense the
multiple ${shell ...} call repetition with a foreach.
* winsup/cygwin/spawn.cc (child_info_spawn::worker): Do the
dummy TranslateMessage call before the section of code that
calls CreateProcess or CreateProcessAsUser.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On the majority of VT100-like terminals, when you print a
character in the last column, the cursor sits in a kind of
"limbo", as if the cursor position were one column past the
edge of the screen. Thus when a line feed is output next,
the cursor is then at the start of the next line.
The Win32 console write doesn't do this; the cursor position
wraps to the start of the next line. If a newline is put out,
it translates to an extra newline going to the next-next line.
This spoils the behavior of programs which depend on the VT100
behavior.
In this patch, the VT100 behavior is simulated as follows. A
new flag in the dev_console structure is set when a character
is output to the last column. This flag is then observed in
order to discard a newline (or rather any character which is
mapped mapped to the DWN action).
* winsup/cygwin/fhandler.h (class dev_console): New boolean
data member, eat_newline. This indicates that if a character
is output which moves down to the next line, it should be
discarded rather than sent to the console.
* winsup/cygwin/fhandler_console.cc
(fhandler_console::write_normal): Set the eat_newline flag
if the text output ends up at column zero. Honor the
eat_newline flag when processing a DWN character, and clear
it when processing certain other control characters.
|
|
|
|
|
|
|
|
| |
This allows applications to distinguish whether they
are running on the stock Cygwin or Cygnal.
* winsup/cygwin/uname.cc (uname): sysname is now filled
in with CYGNAL_ prefix rather than CYGWIN_.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* winsup/cygwin/include/paths.h (_PATH_CMDEXE): New
preprocessor symbol.
* winsup/cygwin/spawn.cc (av_setup): Use _PATH_CMDEXE
rather than "/bin/sh".
* winsup/cygwin/syscalls.cc (system): Spawn _PATH_CMDEXE
with /c option rather than /bin/sh.
(ETC_SHELLS): Preprocessor symbol removed.
(shell_fp): Global variable removed.
(getusershell): Don't open ETC_SHELLS, just march through
static array of shell names. That array contains only one
entry: _PATH_CMDEXE.
(setusershell, endusershell): Remove references to shell_fp.
(popen): Exec _PATH_CMDEXE rather than "/bin/sh", and the
option is /c.
|
|
|
|
|
|
|
|
|
| |
* winsup/cygwin/spawn.cc (child_info_spawn::worker): Do not
call fhandler_console::need_invisible. It's not working
properly. In an application which has no console because it
was compiled -mwindows, calling this funcion causes a visible
console window to appear. We don't need this in Cygnal;
the Microsoft spawn functions don't pop up such windows.
|
|
|
|
|
|
| |
* winsup/cygwin/spawn.cc (child_info_spawn::worker): Add
STARTF_USESHOWWINDOW to dwFlags of the STARTUPINFOW structure,
and set wShowWindow to SW_SHOWNORMAL.
|
|
|
|
| |
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
| |
|
|
|
|
| |
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
|
|
| |
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
| |
|
|
|
|
| |
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
| |
|
|
|
|
|
|
| |
Define the RENAME_NOREPLACE flag in <cygwin/fs.h> as defined on Linux
in <linux/fs.h>. The other RENAME_* flags defined on Linux are not
supported.
|
|
|
|
|
|
|
|
|
| |
Always use the __-decorated form of an attribute name in public
headers, as the bareword form is in the user's namespace, and we
don't want compilation to break just because the user defines the
bareword to mean something else.
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
|
| |
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
|
|
| |
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
|
|
| |
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
|
|
| |
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
|
|
|
|
|
| |
- pthread_mutex::lock now takes a PLARGE_INTEGER timeout pointer
and uses that in the call to cygwait.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Introduce inline helper pthread_convert_abstime. It converts
an absolute timespec to a Windows LARGE_INTEGER timestamp,
depending on the used clock.
- Use this function from pthread_cond_timedwait and semaphore::timedwait
- Merge semaphore::_wait and semaphore::_timedwait into single _wait
method, taking a LARGER_INTEGER timestamp.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
|
|
| |
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
|
|
| |
This reverts commit 54ed68a781fe8a36d08352503524e61534a25e07.
|
|
|
|
| |
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
|
|
| |
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
|
|
|
|
|
|
|
| |
This is copied from musl (MIT license). This is newer and more thorough
than that of FreeBSD currently shipped only on Cygwin.
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
|
|
|
|
|
|
| |
This was added to newlib together with timingsafe_*cmp but never exported.
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
|
|
|
|
| |
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
|
|
| |
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
For historical reasons peek_console was calling the functions
PeekConsoleInputA and ReadConsoleInputA. However, these functions are
not working correctly under at least codepage 65001 (UTF-8) on systems
prior to Windows 10.
Use PeekConsoleInputW and ReadConsoleInputW instead, which work
correctly under all systems and all codepages.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
|
|
| |
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
|
|
|
|
|
|
|
| |
FillConsoleOutputCharacterA doesn't work correctly in codepage 65001
(UTF-8). Looks like the character conversion function from ascii char
to unicode char works incorrectly then. Use FillConsoleOutputCharacterW
instead.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
|
|
| |
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
So far we had two functions checking the content of a reparse point,
readdir_check_reparse_point in fhandler_disk_file.cc for the sake of
readdir, and symlink_info::check_reparse_point for the sake of
generic path checking.
* Rename check_reparse_point_target helper to check_reparse_point_string
and convert to static function.
* Create new check_reparse_point_target helper containing the core
reparse point checking code
* Just call check_reparse_point_target from readdir_check_reparse_point
and symlink_info::check_reparse_point and only perform the unique
task in those functions.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
|
|
| |
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
|
|
| |
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
|
|
| |
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
|
|
| |
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
|
|
| |
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
|
|
|
|
|
|
| |
This reverts commit 44b1746a41921533d27aca414a9188314cb725b6.
Bad idea. _impure_ptr->_errno is used by newlib
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
|
|
| |
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
|
|
| |
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
|
|
|
|
| |
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
|
|
|
|
|
| |
Add line breaks to make it clearer that the struct packing applies to more
than one struct.
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
|
|
|
|
|
| |
* string.h: Local variables in expansion of strdupa and strndupa
* sys/wait.h: Fields in anonymous union in expansion of __wait_status_to_int
|
|
|
|
|
|
|
| |
Use compiler builtin for ffs(). Remove duplicate implementation from
Cygwin.
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
|
|
|
|
|
|
|
|
| |
struct sigaction is POSIX.1-1990 but siginfo_t, which is used by its
sa_sigaction member, is POSIX.1b-1993. Therefore it needs to be guarded
as well, and as part of a union, the struct size is protected.
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
|
|
|
|
| |
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
|
|
| |
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
|
|
| |
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|