There are two common sigpause variants, both of which take an int argument.
If you request _XOPEN_SOURCE or _GNU_SOURCE, you get the System V version,
which removes the given signal from the process's signal mask; otherwise
you get the BSD version, which sets the process's signal mask to the given
value.
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
Also:
Remove obsolete reference to g-b-s
Remove mention of ancient pre-invisiconsole behaviour of setup scripts
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
v2:
autoload PerfDataHelper functions
Keep loadavg in shared memory
Guard loadavg access by a mutex
Initialize loadavg to the current load
v3:
Shared memory version bump isn't needed if we are only extending it
Remove unused autoload
Mark inititalized flags as NO_COPY for correct behaviour in fork child
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
The locale_t type is provided by <xlocale.h> on Linux, FreeBSD, and Darwin.
While, like on some of those systems, it is automatically included by
<locale.h> with the proper feature test macros, its presence under this
particular name is still presumed in real-world software.
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
Note that this always returns with dli_sname and dli_saddr set to NULL,
indicating no symbol matching addr could be found.
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Give more elements ids, so random ids aren't assigned to them, so anchors
are stable between builds.
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
GNU no longer encourages the use of documentation mirrors, to avoid
referring to obsolete documentation. Also www.fsf.org/manual/ is
just a redirect to www.gnu.org/manual/
Links to using-utils.html #fragments are no longer correct as each utility
is now a separate page, since 646745cb.
indiana.edu seems to have moved XLiveCD information, without a redirect.
Linking to clean_setup.pl on cygwin.com doesn't work, as direct downloads
aren't allowed, so instead state where it can be found on a mirror.
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
This patch adds pthread_getname_np and pthread_setname_np.
These were added to glibc in 2.12[1] and are also present in some form on
NetBSD and several UNIXes.
The code is based on NetBSD's implementation with changes to better match
Linux behaviour.
Implementation quirks:
* pthread_setname_np with a NULL pointer segfaults (as linux)
* pthread_setname_np returns ERANGE for names longer than 16 characters (as
linux)
* pthread_getname_np with a NULL pointer returns EFAULT (as linux)
* pthread_getname_np with a buffer length of less than 16 returns ERANGE (as
linux)
* pthread_getname_np truncates the thread name to fit the buffer length.
This guarantees success even when the default thread name is longer than 16
characters, but means there is no way to discover the actual length of the
thread name. (Linux always truncates the thread name to 16 characters)
* Changing program_invocation_short_name changes the default thread name (on
linux, it has no effect on the default thread name)
I'll leave it up to you to decide if any of these matter.
This is implemented via class pthread_attr to make it easier to add
pthread_attr_[gs]etname_np (present in NetBSD and some UNIXes) should it
ever be added to Linux (or we decide we want it anyway).
[1] https://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS
The default UI language returned by GetUserDefaultUILanguage does not
necessarily reflect what the user really wants. E. g., the system could
be en_US, but the desired language is en_CA, without having a CA langpack
installed.
Changing the settings under "Languages" and changing the keyboard layout
is only affecting the so-called "Input language", while what's returned
by GetUserDefaultUILanguage is the "Display language". Changing the
latter requires installing MUI langpacks.
Thus, we introduce a way to fetch the "Input language" using the -i or
--input option.
Also clean up documentation of locale(1).
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Improve the description of Cygwin ldd utility to give a bit more detail
about how it does what it does
Also add a security warning (modelled after the one in the Linux manpage)
that it may end up executing the file it is applied to.
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Fix an instance of the invalid <pathname> tag in Cygwin utils documentation,
by using the valid <filename> tag instead.
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
In Cygwin utils documentation, use the <example> tag at same level as
<para>, not inside it.
This improves the generated manpages.
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Bump GPLv2+ to GPLv3+ for some files, clarify BSD 2-clause.
Everything else stays under GPLv3+.
New Linking Exception exempts resulting executables from LGPLv3 section 4.
Add CONTRIBUTORS file to keep track of licensing.
Remove 'Copyright Red Hat Inc' comments.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Cygwin_props have been invented to allow switching off the unique
installation keys in the first place, supposedly for debugging.
This never really was a good idea, after all we *want* the installations
to be independent and there's no good reason to break that, not even
for debugging purposes.
Other than that, cygwin_props were meant to be used for some other global
settings which never took place. There's just no good reason to tweak
the DLL binary invisibly where a setting could be done in a file or the
environment.
This patch removes the cygwin_props entirely, including the related
settings in cygcheck.
cygwin:
* cygprops.h: Remove file.
* globals.cc (cygwin_props): Remove.
* cygheap.cc (init_cygheap::init_installation_root): Drop removing
installation key.
utils:
* cygcheck.cc: Drop including cygprops.h. Remove now unused option
values.
(unique_object_name_opt): Remove.
(handle_unique_object_name): Remove function.
(usage): Remove text for unique-object-names options.
(longopts): Remove unique-object-names options.
(main): Drop handling unique-object-names options.
doc:
* utils.xml (cygcheck): Remove text for unique-object-names options.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* faq-using.xml (bloda): Alphabetically sort BLODA list for ease
of finding things in it.
(fixing-fork-failures): Update to suggest rebase-trigger rather
than running rebaseall via dash yourself. Mention detect_bloda
CYGWIN token.
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
* setfacl.cc (modacl): Move recomputing mask into new function.
(check_got_mask): New function checking if mask is in input.
(recompute_mask): New function to recompute mask.
(addmissing): Align mask computation to Linux setfacl.
(setfacl): Call check_got_mask and recompute_mask on Set, Delete and
Modify actions.
(usage): Rename --substitute to --set.
(longopts): Add --set option.
* utils.xml (setfacl): Rename --substitute to --set.
* new-features.xml (ov-new2.4): Rephrase setfacl changes.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* mount.cc (mount_info::from_fstab_line): Support mounting the current
user's temp folder as /tmp/. This is particularly useful a feature
when Cygwin's own files are write-protected.
* pathnames.xml: document the new usertemp file system type
Detailed explanation:
In the context of Windows, there is a per-user directory for temporary
files, by default specified via the environment variable %TEMP%. Let's
allow to use that directory for our /tmp/ directory.
With this patch, we introduce the special filesystem type "usertemp":
By specifying
none /tmp usertemp binary,posix=0 0 0
in /etc/fstab, the /tmp/ directory gets auto-mounted to the directory
specified by the %TEMP% variable.
This feature comes handy in particularly in scenarios where the
administrator might want to write-protect the entire Cygwin directory
yet still needs to allow users to write into the /tmp/ directory.
This is the case in the context of Git for Windows, where the
Cygwin (MSys2) root directory lives inside C:\Program Files and hence
/tmp/ would not be writable otherwise.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* include/sys/cygwin.h (CCP_PROC_CYGDRIVE): New flag.
* mount.cc (mount_info::cygdrive_posix_path): Take flag values rather
than just a trailing_slash_p bool. Emit /proc/cygdrive path if
CCP_PROC_CYGDRIVE flag is given.
(mount_info::conv_to_posix_path): Take flag values rather than just
a keep_rel_p bool. Rename _p variables. Print flag value as hex in
debug_printf. Call cygdrive_posix_path with flag values.
* mount.h (mount_info::cygdrive_posix_path): Accommodate above change
in declaration.
(mount_info::conv_to_posix_path): Ditto.
* fhandler_process.cc (format_process_exename): Accommodate change to
mount_info::conv_to_posix_path.
* path.cc (cygwin_conv_path): Ditto.
* cygpath.cc (absolute_flag): Initialize to CCP_RELATIVE to simplify
expressions.
(cygdrive_flag): New global flag.
(long_options): Add --proc-cygdrive option.
(options): Add -U option.
(usage): Add description for -U option.
(do_sysfolders): Or cygdrive_flag to cygwin_conv_path call.
(do_pathconv): Simply or absolute_flag to conv_func. Or
cygdrive_flag to conv_func.
(do_options): Initalize absolute_flag to CCP_RELATIVE. Initialize new
cygdrive_flag. Set absolute_flag to CCP_ABSOLUTE on -a. Set
cygdrive_flag to CCP_PROC_CYGDRIVE on -U.
* new-features.xml (ov-new2.4): Document cygpath -U option.
* utils.xml (cygpath): Ditto.
* path.xml (func-cygwin-path): Add CCP_PROC_CYGDRIVE description.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
One more patch. MacType was observed by several users to cause `GPGME:
Invalid crypto engine` failures in MSYS2. See
<https://github.com/Alexpux/MSYS2-packages/issues/393>.
I also removed two full stops in the sake of consistency.
* faq-using.xml: Add MacType to the BLODA. Fix formatting.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
First take on how to describe dereferencing of Cygwin-only symlinks path
components when creating NTFS symlinks.
Note that I haven't tried building the documentation, so I don't know if
the added paragraph breaks anything. Hopefully not.
* pathnames.xml: Add a section describing peculiarities of how Cygwin
creates NTFS symlinks.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
A user of MSYS2 had non-deterministic segfaults when running simple
command from bash started from cmd. We've isolated the cause to
`C:\Program Files (x86)\Forefront TMG Client\FwcWsp64.dll`. See
<http://sourceforge.net/p/msys2/tickets/212/> for a little more
information.
It seems enough to include the software in BLODA, but if not, sorry for
the unsolicited patch and let's discuss.
* faq-using.xml: Add Forefront TMG to the BLODA
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* nlsfuncs.cc (setlocaleinfo): New macro calling __setlocaleinfo.
(__setlocaleinfo): New function to set a locale-specific character
to an explicit wchar_t value.
(__set_lc_numeric_from_win): Handle fa_IR and ps_AF locales to return
same decimal point and thousands separator characters as on Linux.
(__set_lc_monetary_from_win): Ditto for monetary characters.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>