Commit Graph

184 Commits

Author SHA1 Message Date
Jon Turney b7868e7410
Cygwin: Disable writing core dumps by default.
Change the default core limit from unlimited to 0 (disabled)
2024-01-16 14:07:05 +00:00
Jon Turney 91457377d6
Cygwin: Make 'ulimit -c' control writing a coredump
Pre-format a command to be executed on a fatal error to run 'dumper'
(using an absolute path).

Factor out executing a pre-formatted command, so we can use that for
invoking the JIT debugger in try_to_debug() (if error_start is present
in the CYGWIN env var) and to invoke dumper when a fatal error occurs.

On a fatal error, if the core file size limit is greater than 1MB,
invoke dumper to write a core dump. Otherwise, if that limit is greater
than 0, write a .stackdump file, as previously.

Adjust and clarify the associated documentation.

Also: Fix so that the error_start JIT debugger is now invoked, even when
ulimit -c is zero.

Also: Fix uses of console_printf() inside exec_prepared_command(). It's
output is written via the Windows console device, so needs to use
Windows-style line endings.

Also: consistently return non-zero from try_to_debug() if we debugged.

Future work: Truncate or remove the file written, if it exceeds the
maximum size set by the ulimit.

Future work: Using the words "fatal error" could probably be improved
on. This means exiting on one of the "certain signals whose default
action is to cause the process to terminate and produce a core dump
file".
2024-01-16 14:07:03 +00:00
Christian Franke d8c0fb090c Cygwin: introduce close_range(2)
This function closes or sets the close-on-exec flag for a specified
range of file descriptors.  It is available on FreeBSD and Linux.

Signed-off-by: Christian Franke <christian.franke@t-online.de>
2024-01-15 12:52:56 +01:00
Jon Turney 241b50a7ab
Cygwin: Clarifications in 3.5 changes doc 2024-01-12 13:40:28 +00:00
Corinna Vinschen cb21f8bc56 Cygwin: doc: add missing change to posix_spawnp
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-11-30 22:38:59 +01:00
Corinna Vinschen 832e91422c Cygwin: sparse support: enable automatic sparsifying of files on SSDs
Given that SSDs don't have a seek penalty, we can enable
automatic sparsifying of files on SSDs, even if the "sparse"
mount option is not set.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-11-30 22:37:35 +01:00
Corinna Vinschen e01c50c7b0 Cygwin: introduce fallocate(2)
First cut of the new, Linux-specific fallocate(2) function.
Do not add any functionality yet, except of basic handling
of FALLOC_FL_KEEP_SIZE.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-11-28 10:52:05 +01:00
Christian Franke 643275ed18 Cygwin: Document /dev/disk/by-* subdirectories
Signed-off-by: Christian Franke <christian.franke@t-online.de>
2023-11-17 20:37:29 +01:00
Christian Franke 7236f22f71 Cygwin: Document /dev/disk/by-id and /dev/disk/by-partuuid
Signed-off-by: Christian Franke <christian.franke@t-online.de>
2023-11-07 16:15:12 +01:00
Corinna Vinschen 2ab2e73c2c Cygwin: document FIFO over NFS change
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-09-04 10:41:06 +02:00
Corinna Vinschen 9939aa7d09 Cygwin: add SEEK_DATA/SEEK_HOLE addition to release message
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-08-09 17:21:54 +02:00
Corinna Vinschen c49bc478b4 Cygwin: Add ISO C2X functions c8rtomb, mbrtoc8
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-08-02 16:56:24 +02:00
Corinna Vinschen 4f258c55e8 Cygwin: Add ISO C11 functions c16rtomb, c32rtomb, mbrtoc16, mbrtoc32.
Add uchar.h accordingly.

For the c32 functions, use the internal functions wirtomb and mbrtowi
as base, and convert wirtomb and mbrtowi to inline functions calling
the c32 functions.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-07-31 22:39:09 +02:00
Corinna Vinschen c743751aaf Cygwin: Export posix_spawn_file_actions_add{f}chdir_np
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-04-19 00:34:36 +02:00
Corinna Vinschen 5da71b6059 Cygwin: add support for GB18030 codeset
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-03-16 18:25:09 +01:00
Corinna Vinschen c0aba3141b Cygwin: add collating symbols support to release message
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-03-01 11:49:52 +01:00
Corinna Vinschen c42b98bdc6 Cygwin: introduce /proc/codesets and /proc/locales
So far locale(1) had to have knowledge how to construct, thus
duplicating the effort how Cygwin handles locale strings.

Move locale list and codeset list generation into Cygwin by
providing /proc/codesets and /proc/locales files.  /proc/locales
does not list aliases, those are still handled in locale(1).

locale(1) opens the files and ueses that info for printing,
like any other application can do now.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-02-26 17:07:06 +01:00
Corinna Vinschen c750a728bd add glob/fnmatch equivalence class support to release notes
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-02-15 22:37:32 +01:00
Corinna Vinschen 65446dd4f0 Cygwin: add glob/fnmatch named class support to release notes
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-02-15 14:22:26 +01:00
Corinna Vinschen c061551c67 Cygwin: add new cygcheck capabilities to release notes
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-01-29 18:40:14 +01:00
Corinna Vinschen 62b9c98f12 Cygwin: add newgrp(1) to release message for 3.5.0
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2023-01-14 18:00:35 +01:00
Corinna Vinschen 389f071f44 Cygwin: document ASLR support
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-10-28 16:26:53 +02:00
Corinna Vinschen eaa51ea459 Cygwin: add missing .com entry in new-features.xml
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-10-28 13:02:20 +02:00
Corinna Vinschen 762dcfc658 Cygwin: document dropping 32 bit support
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-10-27 21:45:52 +02:00
Ken Brown 5d4f405d3b Cygwin: redefine some macros for Linux compatibility
Define FD_SETSIZE (<sys/select.h>) to be 1024 by default, and define
NOFILE (<sys/param.h>) to be OPEN_MAX (== 3200) by default.

Remove the comment in <sys/select.h> that FD_SETSIZE should be >=
NOFILE.

Bump API minor.

Addresses: https://cygwin.com/pipermail/cygwin/2022-July/251839.html
2022-07-07 08:22:40 -04:00
Ken Brown 1503d14af1 Cygwin: stdio: don't try again to read after EOF
This reverts commit 1f8f7e2d54, "* libc/stdio/refill.c (__srefill):
Try again after EOF on Cygwin."  If EOF is set on a file, the stdio
input functions will now immediately return EOF rather than trying
again to read.  This aligns Cygwin's behavior to that of Linux.

Addresses: https://cygwin.com/pipermail/cygwin/2022-June/251672.html
2022-07-04 18:55:08 -04:00
Corinna Vinschen 7c804d160d Cygwin: Implement GSO/GRO support
- getsockopt (SOL_UDP, UDP_SEGMENT)
- setsockopt (SOL_UDP, UDP_SEGMENT)
- getsockopt (SOL_UDP, UDP_GRO)
- setsockopt (SOL_UDP, UDP_GRO)
- sendmsg with SOL_UDP/UDP_SEGMENT control message
- recvmsg, convert Winsock UDP_COALESCED_INFO (DWORD) control message to
  Linux compatible SOL_UDP/UDP_GRO (uint16_t)
2022-05-13 11:11:38 +02:00
Corinna Vinschen 3e4dd6cc48 Cygwin: update 3.4 release text
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2022-03-01 16:27:10 +01:00
Ken Brown 451bbfb9f3 Cygwin: Document that the pipe_byte option is now set by default 2021-12-12 22:14:12 +09:00
Takashi Yano 8dd641f236 Cygwin: Fix typo in new-features.xml 2021-12-03 12:19:44 +09:00
Corinna Vinschen 3502a6ff2e Cygwin: add 3.4 release messages
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2021-11-26 17:06:00 +01:00
Ken Brown 593a86f9b0 Cygwin: document the recent pipe changes 2021-09-14 14:59:28 -04:00
Corinna Vinschen 5970bbded8 Cygwin: export new sig2str/str2sig
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2021-08-02 13:57:03 +02:00
Corinna Vinschen cf9a51371c Cygwin: clarify importance of new GNU-specifc API
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2021-08-02 13:53:38 +02:00
Corinna Vinschen fff00f776b Cygwin: bump API minor and set DLL version to 3.3.0
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2021-07-29 17:44:20 +02:00
Ken Brown cee03513d8 Cygwin: cfsetspeed: allow speed to be a numerical baud rate
The Linux man page for cfsetspeed(3) specifies that the speed argument
must be one of the constants Bnnn (e.g., B9600) defined in termios.h.
But Linux in fact allows the speed to be the numerical baud rate
(e.g., 9600).  For consistency with Linux, we now do the same.

Addresses: https://cygwin.com/pipermail/cygwin/2021-July/248887.html
2021-07-12 16:26:13 -04:00
Corinna Vinschen f578883232 Cygwin: add "app execution aliases" treatment to release notes
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2021-03-23 16:54:41 +01:00
Corinna Vinschen 1eaa9b08af Cygwin: update release notes for 3.2.0, part 4
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2021-03-09 10:06:03 +01:00
Ken Brown a9ff2cad68 Cygwin: update release notes for 3.2.0 2021-03-08 09:54:43 -05:00
Corinna Vinschen 07e2ce9f55 Cygwin: update release notes for 3.2.0, part 2
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2021-03-08 11:40:09 +01:00
Takashi Yano via Cygwin-patches b07b5829f2 Cygwin: Add console fix regarding Ctrl-Z etc. to release notes. 2021-02-19 17:58:15 +01:00
Corinna Vinschen ec9734dbb5 Cygwin: Add Cygwin 3.2 release info
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2020-08-30 14:27:43 +02:00
Corinna Vinschen 5266248285 Cygwin: add new IPPROTO_TCP options to release notes
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2020-07-01 21:33:15 +02:00
Ken Brown 84d446734f Document recent FIFO changes 2020-05-08 07:42:14 -04:00
Corinna Vinschen 44da5e4b8c Cygwin: symlinks: create WSL symlinks on supporting filesystems
WSL symlinks are reparse points containing a POSIX path in UTF-8.
On filesystems supporting reparse points, use this symlink type.
On other filesystems, or in case of error, fall back to the good
old plain SYSTEM file.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2020-04-03 21:40:01 +02:00
Corinna Vinschen 4a36897af3 Cygwin: symlinks: support WSL symlinks
Treat WSL symlinks just like other symlinks.  Convert
absolute paths pointing to Windows drives via
/mnt/<driveletter> to Windows-style paths <driveletter>:

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2020-03-27 12:12:31 +01:00
Corinna Vinschen 592b03b3ba Cygwin: add @cjksingle to release docs
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2020-02-18 11:35:42 +01:00
Ken Brown 1cc07f3a3e Cygwin: document recent changes 2020-01-30 09:43:19 -05:00
Ken Brown 4261a8f5ca Cygwin: document recent changes 2020-01-20 09:47:41 -05:00
Ken Brown e82a0c959a Cygwin: document recent changes to format_proc_cpuinfo 2019-10-07 16:06:28 -04:00