]> sourceware.org Git - newlib-cygwin.git/log
newlib-cygwin.git
5 years agoCygwin: Allow accessing 48 bit address space in Windows 8.1 or later
Corinna Vinschen [Tue, 4 Jun 2019 14:58:53 +0000 (16:58 +0200)]
Cygwin: Allow accessing 48 bit address space in Windows 8.1 or later

64 bit Windows started out with a 44 bit address space due to a
restriction of the AMD64 CPUs at the time.  Starting with Windows
8.1, these CPUs are not supported anymore and Windows switched to
the full 48 bit address space supported by AMD64.

Cygwin didn't follow suit yet so mmaps are still restricted to
the lower 44 bit address space.  Fix that by using a system-specific
upper address for mmap allocations, 44 bit up to Windows 8, 48 bit
starting with Windows 8.1.

While at it, move the heap by another 8 Gigs to leave some space
for a potential extension of DLL address space, and restrict the
mmap lower address so the heap can grow to 32 Gigs before colliding
with mmaps.

5 years agoCygwin: fork: Remember child not before success.
Michael Haubenwallner [Thu, 2 May 2019 10:12:44 +0000 (12:12 +0200)]
Cygwin: fork: Remember child not before success.

Do not remember the child before it was successfully initialized, or we
would need more sophisticated cleanup on child initialization failure,
like cleaning up the process table and suppressing SIGCHILD delivery
with multiple threads ("waitproc") involved.  Compared to that, the
potential slowdown due to an extra yield () call should be negligible.

5 years agoCygwin: fork: Always pause child after fixups.
Michael Haubenwallner [Tue, 30 Apr 2019 07:09:13 +0000 (09:09 +0200)]
Cygwin: fork: Always pause child after fixups.

Pause the child process after performing fork fixups even if there were
no dynamically loaded dlls with extra data/bss transfers to wait for.
This allows the parent process to cancel the current fork call even if
the child process was successfully initialized already.

This is a preparation for when the parent does remember the child no
earlier than after successful child initialization.

5 years agoCygwin: dll_list: no recursive use of nt_max_path_buf
Michael Haubenwallner [Mon, 13 May 2019 14:36:23 +0000 (16:36 +0200)]
Cygwin: dll_list: no recursive use of nt_max_path_buf

Querying the ntlength and existence of the /var/run/cygfork directory in
the very first Cygwin process should not use nt_max_path_buf, as that
one is used by dll_list::alloc already.

5 years agoCygwin: dll_list: stat_real_file_once with ntname
Michael Haubenwallner [Fri, 3 May 2019 14:14:14 +0000 (16:14 +0200)]
Cygwin: dll_list: stat_real_file_once with ntname

NtQueryVirtualMemory for MemorySectionName may return some old path even
if the process was just started, for when some directory in between was
renamed - maybe because the NT file cache is hot for the old path still.
This was seen during gcc bootstrap, returning a MemorySectionName of
".../gcc/xgcc.exe" even if started as ".../prev-gcc/xgcc.exe", where the
directory rename from "gcc" to "prev-gcc" was done the moment before.
As we stat the module's real file right after loading now, there is no
point in using NtQueryVirtualMemory with MemorySectionName any more, and
we can use what GetModuleFileName returned instead.

5 years agoFix vfwscanf(3) assignment suppression flag handling bug
Lucio Andrés Illanes Albornoz [Sat, 1 Jun 2019 08:33:19 +0000 (10:33 +0200)]
Fix vfwscanf(3) assignment suppression flag handling bug

newlib's vfwscanf(3) (or specifically, __SVFWSCANF_R()) fails to correctly set
the assignment-suppressing character (`*') flag[1] which, when present in the
formatting string, results in undefined behaviour comprising retrieving and
dereferencing a pointer that was not supplied by the caller as such or at all.
When compared to the vfscanf(3) implementation, this would appear to be over
the missing goto match_failure statement preceded by the flags test seen below.
Hence, this patch (re)introduces it.

[1] <http://pubs.opengroup.org/onlinepubs/009695399/functions/fwscanf.html>

--

5 years agoAdd support for Hygon Dhyana processor
Jinke Fan [Fri, 17 May 2019 03:29:11 +0000 (11:29 +0800)]
Add support for Hygon Dhyana processor

-Add vendor identification
-Support in get_cpu_cache

Background:
    Chengdu Haiguang IC Design Co., Ltd (Hygon) is a Joint Venture
    between AMD and Haiguang Information Technology Co.,Ltd., aims at
    providing high performance x86 processor for China server market.
    Its first generation processor codename is Dhyana, which
    originates from AMD technology and shares most of the
    architecture with AMD's family 17h, but with different CPU Vendor
    ID("HygonGenuine")/Family series number(Family 18h).

Related Hygon kernel patch can be found on:
http://lkml.kernel.org/r/5ce86123a7b9dad925ac583d88d2f921040e859b.1538583282.git.puwen@hygon.cn

Signed-off-by: Jinke Fan <fanjinke@hygon.cn>
5 years agoFix <sys/_types.h> issues with <stddef.h>
Sebastian Huber [Thu, 16 May 2019 12:40:34 +0000 (14:40 +0200)]
Fix <sys/_types.h> issues with <stddef.h>

A commit from 2016 tried to address this GCC provided <stddef.h> issue

    #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \
      || defined(__DragonFly__) \
      || defined(__FreeBSD_kernel__)
    /* __size_t is a typedef on FreeBSD 5, must not trash it. */
    #elif defined (__VMS__)
    /* __size_t is also a typedef on VMS.  */
    #else
    #define __size_t
    #endif

with an include of <stddef.h> before <sys/_types.h> in <sys/types.h>.
Is is not robust enough.  Do the include of <stddef.h> in <sys/_types.h>
directly and request only the necessary types.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
5 years agoAvoid <sys/cdefs.h> dependency in <sys/_types.h>
Sebastian Huber [Thu, 16 May 2019 12:40:33 +0000 (14:40 +0200)]
Avoid <sys/cdefs.h> dependency in <sys/_types.h>

Including <sys/cdefs.h> could result in cyclic header dependencies.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
5 years agoAvoid cyclic header dependencies
Sebastian Huber [Thu, 16 May 2019 12:40:32 +0000 (14:40 +0200)]
Avoid cyclic header dependencies

RTEMS uses a considerable part of FreeBSD kernel and user space sources.
These sources are compiled with a __FreeBSD__ define.  On 2018-06-26
Gerald Pfeifer changed the GCC provided <stddef.h> so that it includes
<sys/_types.h> if __FreeBSD__ is defined.  The Newlib <sys/_types.h>
included <sys/lock.h> which includes <sys/cdefs.h> on RTEMS which
includes <stddef.h>.  To get rid of this cyclic dependency move the
optional _flock_t definition to <sys/reent.h>.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
5 years agoCygwin: FIFO: respect the O_CLOEXEC flag
Ken Brown [Tue, 28 May 2019 19:50:05 +0000 (15:50 -0400)]
Cygwin: FIFO: respect the O_CLOEXEC flag

Set the inheritance of the Windows pipe handles according to the
O_CLOEXEC flag.  Previously the pipe was always created and opened
with OBJ_INHERIT.

5 years agoCygwin: FIFO: Open only one handle to NPFS
Ken Brown [Thu, 23 May 2019 12:34:09 +0000 (08:34 -0400)]
Cygwin: FIFO: Open only one handle to NPFS

Make npfs_handle a static member function of fhandler_fifo, as in
fhandler_socket_unix.

5 years agoRISC-V: Add _LITE_EXIT in crt0.S.
Jim Wilson [Thu, 23 May 2019 00:41:25 +0000 (17:41 -0700)]
RISC-V: Add _LITE_EXIT in crt0.S.

This patch adds _LITE_EXIT in crt0.S to enable "lite exit" technique in
RISC-V. The changes have been tested in riscv/riscv-gnu-toolchain by
riscv-dejagnu with riscv-sim.exp/riscv-sim-nano.exp.

5 years agoRISC-V: Add size optimized memcpy, memmove, memset and strcmp.
Jim Wilson [Thu, 23 May 2019 00:36:57 +0000 (17:36 -0700)]
RISC-V: Add size optimized memcpy, memmove, memset and strcmp.

This patch adds implementations of memcpy, memmove, memset and strcmp
optimized for size. The changes have been tested in
riscv/riscv-gnu-toolchain by riscv-dejagnu with
riscv-sim.exp/riscv-sim-nano.exp.

5 years agoMake .data section placement coincide with _fdata symbol
Faraz Shahbazker [Thu, 2 May 2019 16:16:44 +0000 (16:16 +0000)]
Make .data section placement coincide with _fdata symbol

The _fdata symbol in MIPS linker scripts is aligned to a 16-byte
boundary.  The ALIGN function does not implicitly update current
location counter.  If sections positioned after the assignment
do not have the same natural alignment as the ALIGN function then
the start of the section group will not coincide with the value
of the symbol.

Given the linker command sequence:
  symbol = ALIGN (NN);
  (.section*)
where the idiom implies a desire to mark the beginning of .section
with symbol, there must be an assignment to the location counter
between the assignment to symbol and the .section pattern.

libgloss/
* mips/array.ld: Update the location counter to match _fdata.
* mips/cfe.ld: Likewise.
* mips/ddb-kseg0.ld: Likewise.
* mips/ddb.ld: Likewise.
* mips/dve.ld: Likewise.
* mips/idt.ld: Likewise.
* mips/idt32.ld: Likewise.
* mips/idt64.ld: Likewise.
* mips/idtecoff.ld: Likewise.
* mips/jmr3904app-java.ld: Likewise.
* mips/jmr3904app.ld: Likewise.
* mips/jmr3904dram-java.ld: Likewise.
* mips/jmr3904dram.ld: Likewise.
* mips/lsi.ld: Likewise.
* mips/mti32.ld: Likewise.
* mips/mti64.ld: Likewise.
* mips/mti64_64.ld: Likewise.
* mips/mti64_n32.ld: Likewise.
* mips/nullmon.ld: Likewise.
* mips/pmon.ld: Likewise.
* mips/sde32.ld: Likewise.
* mips/sde64.ld: Likewise.

5 years agoCygwin: FIFO: code simplifications.
Ken Brown [Thu, 9 May 2019 16:35:58 +0000 (12:35 -0400)]
Cygwin: FIFO: code simplifications.

There's no longer a need to consider the connect_evt after fork/exec.
After stopping the listen_client thread, all client handlers should be
in the fc_connected or fc_invalid states, so their connect_evt members
won't be used again.

Also remove code in fhandler_fifo::dup that just repeats things
already done in stop_listen_client.

5 years agoCygwin: FIFO: make read_ready an auto-reset event
Ken Brown [Thu, 9 May 2019 16:32:17 +0000 (12:32 -0400)]
Cygwin: FIFO: make read_ready an auto-reset event

There's no point in allowing a writer to attempt to open until we've
created a pipe instance.

5 years agoCygwin: FIFO: improve the check for the listen_client thread
Ken Brown [Thu, 9 May 2019 16:28:21 +0000 (12:28 -0400)]
Cygwin: FIFO: improve the check for the listen_client thread

Add a method fhandler_fifo::check_listen_client_thread that checks
whether the thread is running.  Use it in raw_read instead of just
testing the handle listen_client_thr.

5 years agoCygwin: FIFO: set client handler flags more accurately
Ken Brown [Thu, 9 May 2019 16:04:14 +0000 (12:04 -0400)]
Cygwin: FIFO: set client handler flags more accurately

Reflect the fact that client handlers are only used for reading and
that, after connection, they are always nonblocking.

5 years agoCygwin: FIFO: don't leave a pending listen request
Ken Brown [Thu, 9 May 2019 15:55:30 +0000 (11:55 -0400)]
Cygwin: FIFO: don't leave a pending listen request

On exit from the listen_client thread, make sure there's no pending
FSCTL_PIPE_LISTEN request.  Otherwise we might get a client connection
after restarting the thread, and we won't have a handle for
communicating with that client.

Remove the retry loop in the case of STATUS_PIPE_LISTENING; that case
shouldn't occur.

Remove the now-unused fc_connecting value from
fifo_client_connect_state.

5 years agoCygwin: FIFO: add a HANDLE parameter to open_pipe
Ken Brown [Thu, 9 May 2019 15:36:26 +0000 (11:36 -0400)]
Cygwin: FIFO: add a HANDLE parameter to open_pipe

It's now up to the caller to pass a handle to open_pipe and, if
desired, to call set_handle on return.

This will be useful for a future commit, in which we will open a
client connection without setting an io_handle.

5 years agoCygwin: FIFO: re-implement duplexers
Ken Brown [Thu, 9 May 2019 15:23:44 +0000 (11:23 -0400)]
Cygwin: FIFO: re-implement duplexers

When opening a duplexer, open a client connection to the first client
handler.  Previously we gave the duplexer a bogus write handle, which
was just a duplicate of the first client handler's handle.  This meant
that we had a pipe server with no clients connected, and all I/O
attempts failed with STATUS_PIPE_LISTENING.

Extend the last fcntl change to duplexers.

Remove a now unused fifo_client_handler constructor, as well as the
long unusued method fifo_client_handler::connect.

Don't create the pipe in duplex mode; the server handle will only be
used for reading.

5 years agoCygwin: FIFO: add 'record_connection' method
Ken Brown [Thu, 9 May 2019 14:58:29 +0000 (10:58 -0400)]
Cygwin: FIFO: add 'record_connection' method

Future commits will have to re-use the code for recording a client
connection.  For convenience, factor out this code into a new method.

5 years agoCygwin: FIFO: remove incorrect duplexer code
Ken Brown [Thu, 9 May 2019 14:47:47 +0000 (10:47 -0400)]
Cygwin: FIFO: remove incorrect duplexer code

raw_read had some code that was based on an incorrect implementation
of duplexers.

5 years agoRevert "Cygwin: check for STATUS_PENDING in fhandler_base::raw_read"
Ken Brown [Thu, 9 May 2019 14:41:41 +0000 (10:41 -0400)]
Revert "Cygwin: check for STATUS_PENDING in fhandler_base::raw_read"

This reverts commit 10bf30bebf7feebbc3e376cbcac62a242cc240f3.  It was
made because an incorrect implementation of duplex FIFOs.

5 years agoCygwin: dll_list: drop unused read_fbi method
Michael Haubenwallner [Thu, 2 May 2019 08:05:25 +0000 (10:05 +0200)]
Cygwin: dll_list: drop unused read_fbi method

5 years agoCygwin: Add release info for 3.0.7
Corinna Vinschen [Tue, 30 Apr 2019 16:47:02 +0000 (18:47 +0200)]
Cygwin: Add release info for 3.0.7

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
(cherry picked from commit 01c253a4c58b6c1da01615431bdc4c88fcba48ea)

5 years agoCygwin: dll_list: query dll file id at load time
Michael Haubenwallner [Tue, 30 Apr 2019 14:15:30 +0000 (16:15 +0200)]
Cygwin: dll_list: query dll file id at load time

NtQueryVirtualMemory for MemorySectionName does not reliable return the
changed dll file name when another process does move the file around,
and we may end up creating forkable hardlinks to wrong dll files.
So query the file id when loading the dll rather than before fork.

5 years agoCygwin: dll_list: stat_real_file_once as dll method
Michael Haubenwallner [Tue, 30 Apr 2019 14:14:55 +0000 (16:14 +0200)]
Cygwin: dll_list: stat_real_file_once as dll method

Make stat_real_file_once a method of struct dll, to be more flexible on
where to use.  Also, debug print memory section name queried for a dll.
This is a preparation to query the file id when loading the dll.

5 years agoCygwin: dll_list: drop FILE_BASIC_INFORMATION
Michael Haubenwallner [Tue, 30 Apr 2019 14:14:09 +0000 (16:14 +0200)]
Cygwin: dll_list: drop FILE_BASIC_INFORMATION

Querying FILE_BASIC_INFORMATION is needless since using win pid+threadid
for forkables dirname rather than newest last write time.

5 years agoCygwin: update era and message locale data
Corinna Vinschen [Tue, 30 Apr 2019 09:52:29 +0000 (11:52 +0200)]
Cygwin: update era and message locale data

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
5 years agoFix order of eh_frame sections in linker scripts
Faraz Shahbazker [Sun, 28 Apr 2019 18:17:14 +0000 (18:17 +0000)]
Fix order of eh_frame sections in linker scripts

The compiler driver positions the linker script at the end of the linker
command-line, after crtend.o.  As a result, any INPUT objects and archive
GROUPs introduced by the linker script are placed after crtend.o and the
end-of-frame marker provided by crtend.o ends up in between .eh_frames
instead of being at the end.

This has always been a problem, but a binutils update to clean-up
redundant NULL markers in .eh_frame exposes it as a execution failure in
exception-handling tests.  This patch re-orders .eh_frames in all
MIPS linker scripts so that the one from crtend.o is always placed last.

libgloss/
* mips/array.ld: Re-order to place .eh_frame from crtend.o
after all other .eh_frame sections.
* mips/cfe.ld: Likewise.
* mips/ddb-kseg0.ld: Likewise.
* mips/ddb.ld: Likewise.
* mips/dve.ld: Likewise.
* mips/idt.ld: Likewise.
* mips/idt32.ld: Likewise.
* mips/idt64.ld: Likewise.
* mips/jmr3904app.ld: Likewise.
* mips/lsi.ld: Likewise.
* mips/mti32.ld: Likewise.
* mips/mti64.ld: Likewise.
* mips/mti64_64.ld: Likewise.
* mips/mti64_n32.ld: Likewise.
* mips/nullmon.ld: Likewise.
* mips/pmon.ld: Likewise.
* mips/sde32.ld: Likewise.
* mips/sde64.ld: Likewise.

5 years agoCygwin: FIFO: synchronize the blocking mode of a writer's pipe
Ken Brown [Thu, 25 Apr 2019 22:21:11 +0000 (18:21 -0400)]
Cygwin: FIFO: synchronize the blocking mode of a writer's pipe

The blocking mode of the Windows pipe underlying a writer is set to
match that of the writer itself when the latter is opened.  Define
fhandler_fifo::fcntl to keep the pipe and the writer in sync if the
blocking mode is changed via fcntl.

5 years agoCygwin: define MSG_EOR and refuse in send(2)
Corinna Vinschen [Thu, 25 Apr 2019 16:49:32 +0000 (18:49 +0200)]
Cygwin: define MSG_EOR and refuse in send(2)

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
5 years agoMinor improvements to socket error handling:
Erik M. Bray [Tue, 23 Apr 2019 14:55:33 +0000 (16:55 +0200)]
Minor improvements to socket error handling:

* Change default fallback for failed winsock error -> POSIX error
  mappings to EACCES, which is a valid errno for more socket-related
  syscalls.

* Added a few previously missing entries to the wsock_errmap table
  that have obvious POSIX errno.h analogues.

5 years agoCygwin: FIFO: restart listen_client thread after fork/exec
Ken Brown [Sat, 20 Apr 2019 15:46:09 +0000 (11:46 -0400)]
Cygwin: FIFO: restart listen_client thread after fork/exec

This allows writers to connect immediately.  Previously the lct wasn't
restarted until the reader attempted to read.

5 years agoCygwin: FIFO: stop the listen_client thread before fork/exec
Ken Brown [Sat, 20 Apr 2019 15:41:12 +0000 (11:41 -0400)]
Cygwin: FIFO: stop the listen_client thread before fork/exec

Add methods need_fixup_before, init_fixup_before, and
fixup_before_fork_exec to accomplish this.  Stopping the thread makes
sure that the client handler lists of the parent and child remain in
sync while the forking/execing is in progress.

5 years agoCygwin: FIFO: close connect_evt handles as soon as possible
Ken Brown [Sat, 20 Apr 2019 15:31:08 +0000 (11:31 -0400)]
Cygwin: FIFO: close connect_evt handles as soon as possible

Keeping them open too long can cause an attempt to close them twice
after a fork or exec.

5 years agoCygwin: FIFO: avoid WFMO error in listen_client_thread
Ken Brown [Sat, 20 Apr 2019 15:22:29 +0000 (11:22 -0400)]
Cygwin: FIFO: avoid WFMO error in listen_client_thread

Don't set lct_termination_evt to NULL too early in
fhandler_fifo::stop_listen_client.  Doing so leads to an "Invalid
Handle" error in WFMO.

5 years agoCygwin: FIFO: duplicate the i/o handle when opening a duplexer
Ken Brown [Sat, 20 Apr 2019 15:49:35 +0000 (11:49 -0400)]
Cygwin: FIFO: duplicate the i/o handle when opening a duplexer

Don't use the same i/o handle for the first client handler as is used
for the fhandler itself; this can lead to a later attempt to close the
same handle twice.  Instead use a duplicate.

5 years agoCygwin: FIFO: stop the listen_client thread on an opening error
Ken Brown [Sat, 20 Apr 2019 15:44:01 +0000 (11:44 -0400)]
Cygwin: FIFO: stop the listen_client thread on an opening error

Don't just close the thread handle.

5 years agoCygwin: drop unsupported Windows 10 versions
Corinna Vinschen [Fri, 19 Apr 2019 16:01:44 +0000 (18:01 +0200)]
Cygwin: drop unsupported Windows 10 versions

* Pre-release version still reporting kernel version 6.4.
* Windows 10 1511 is out of support since 2017-10-10.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
5 years agoCygwin: FIFO: avoid hang after exec
Ken Brown [Thu, 18 Apr 2019 15:39:52 +0000 (15:39 +0000)]
Cygwin: FIFO: avoid hang after exec

Define fhandler:fifo::fixup_after_exec, which sets listen_client_thr
and lct_termination_evt to NULL.  This forces the listen_client thread
to restart on the first attempt to read after an exec.  Previously the
exec'd process could hang in fhandler_fifo::raw_read.

5 years agoMSP430: Make the inclusion of run_*_array fns depend on defined assembler symbols
Jozef Lawrynowicz [Wed, 17 Apr 2019 12:17:38 +0000 (13:17 +0100)]
MSP430: Make the inclusion of run_*_array fns depend on defined assembler symbols

Many of the MSP430 crt functions (e.g. to initialize bss) are linked
"dynamically", based on symbols defined in the program.
The GNU assembler defines the symbols corresponding to the crt
functions by examining the section names in the input file.

If GCC has been configured with --enable-initfini-array, then
.init_array and .fini_array will hold pointers to global
constructors/destructors. These sections can also hold functions that
need to be executed for other purposes.

The attached patch puts the __crt0_run_{preinit,init,fini}_array and
__crt0_run_array functions in their own object files, so they will
only be linked when needed.

Successfully regtested the DejaGNU GCC testsuite using the binutils and
newlib changes together with GCC trunk configured with
--enable-initfini-array.

5 years agoFix incorrect assembly code in _msp430_run_array
Jozef Lawrynowicz [Mon, 15 Apr 2019 17:06:09 +0000 (18:06 +0100)]
Fix incorrect assembly code in _msp430_run_array

5 years agoCygwin: FIFO: fix and simplify listen_client_thread
Ken Brown [Sun, 14 Apr 2019 19:16:04 +0000 (19:16 +0000)]
Cygwin: FIFO: fix and simplify listen_client_thread

Remove fifo_client_handler::connect and move its code into
listen_client_thread.  That way we can check the return status when a
client handler's connect_evt is signaled.  Previously we incorrectly
assumed there was a successful connection.

Also simplify listen_client_thread in the following ways:

- Replace fhandler_fifo::disconnect_and_reconnect by a new
  delete_client_handler method.  Now we just delete invalid client
  handlers rather than trying to re-use them.

- Try to maintain a client handler list that consists of connected
  client handlers and exactly one that is listening for a connection.
  This allows us to call WaitForMultipleObjects with only two wait
  objects.

- Remove 'dummy_evt' from the fifo_client_handler struct; it is no
  longer needed.

- On exit from listen_client_thread, delete the "extra" (listening)
  client handler.  Otherwise there could be a connection that doesn't
  get recorded in the client handler list.  This could happen when a
  file descriptor is being duplicated.

5 years agoCygwin: FIFO: improve raw_write
Ken Brown [Mon, 15 Apr 2019 15:43:57 +0000 (15:43 +0000)]
Cygwin: FIFO: improve raw_write

Don't set the write end of the pipe to non-blocking mode if the FIFO
is opened in blocking mode.

In fhandler_fifo::raw_write in blocking mode, wait for the write to
complete rather than returning -1 with EAGAIN.

If the amount to write is large, write in smaller chunks (of size
determined by a new data member max_atomic_write), as in
fhandler_base_overlapped.

For convenience, add two new NTSTATUS codes, STATUS_THREAD_SIGNALED
and STATUS_THREAD_CANCELED, to ntdll.h.

5 years agoCygwin: FIFO: start the listen_client thread when duping a reader
Ken Brown [Sun, 14 Apr 2019 19:16:03 +0000 (19:16 +0000)]
Cygwin: FIFO: start the listen_client thread when duping a reader

Otherwise it doesn't get started until the dup'd fd tries to read,
which delays client connections.

5 years agoCygwin: FIFO: fix clone
Ken Brown [Sun, 14 Apr 2019 19:16:02 +0000 (19:16 +0000)]
Cygwin: FIFO: fix clone

After copyto is called, make the new fhandler's pipe_name point to the
new fhandler's pipe_name_buf, which is a *copy* of the old fhandler's
pipe_name_buf.  Previously, get_pipe_name would return the wrong
result after a clone/dup, causing create_pipe_instance and open_pipe
to fail.

Also, stop the listen_client thread when cloning.  Otherwise the
thread can keep accepting connections that the cloned fhandler won't
know about.

Do this via a new method fhandler_fifo::stop_listen_client, extracted
from fhandler_fifo::close.

5 years agoCygwin: FIFO: use a retry loop when opening a writer
Ken Brown [Sun, 14 Apr 2019 19:16:02 +0000 (19:16 +0000)]
Cygwin: FIFO: use a retry loop when opening a writer

There may be short periods when there's no pipe instance available.
Keep trying.

5 years agoCygwin: FIFO: fix the use of the read_ready event
Ken Brown [Sun, 14 Apr 2019 19:16:01 +0000 (19:16 +0000)]
Cygwin: FIFO: fix the use of the read_ready event

Make read_ready a manual reset event.  It should always be set shortly
after startup of the listen_client thread and remain set until the
thread terminates.  (We don't want writers to connect without being
recorded in the client handler list.)

Remove the unnecessary code that checks for read_ready when a reader
is opening.

5 years agoCygwin: FIFO: fix fifo_client_handler::close
Ken Brown [Sun, 14 Apr 2019 19:16:00 +0000 (19:16 +0000)]
Cygwin: FIFO: fix fifo_client_handler::close

Make sure that fhandler_base::close rather than fhandler_fifo::close
is called on the fhandler.  Also, delete the fhandler, since we
allocated it.

5 years agoCygwin: FIFO: code simplification: don't overload get_handle
Ken Brown [Sun, 14 Apr 2019 19:16:00 +0000 (19:16 +0000)]
Cygwin: FIFO: code simplification: don't overload get_handle

Rename fhandler_fifo::get_handle(int) to get_fc_handle(int), and
remove fhandler_fifo::get_handle(void).

5 years agoCygwin: check for STATUS_PENDING in fhandler_base::raw_read
Ken Brown [Sun, 14 Apr 2019 19:15:59 +0000 (19:15 +0000)]
Cygwin: check for STATUS_PENDING in fhandler_base::raw_read

If NtReadFile returns STATUS_PENDING, wait for the read to complete.
This can happen, for instance, in the case of a FIFO opened with
O_RDRW.

5 years agoCygwin: FIFO: fix the error checking in raw_read
Ken Brown [Sun, 14 Apr 2019 19:15:58 +0000 (19:15 +0000)]
Cygwin: FIFO: fix the error checking in raw_read

If the pipe is empty, we can get either ERROR_NO_DATA or
ERROR_PIPE_LISTENING.

5 years agoCygwin: FIFO: fix a thinko in listen_client_thread
Ken Brown [Sun, 14 Apr 2019 19:15:58 +0000 (19:15 +0000)]
Cygwin: FIFO: fix a thinko in listen_client_thread

5 years agoCygwin: FIFO: remember the type of the fhandler
Ken Brown [Sun, 14 Apr 2019 19:15:57 +0000 (19:15 +0000)]
Cygwin: FIFO: remember the type of the fhandler

Add data members 'reader', 'writer', and 'duplexer' to the
fhandler_fifo class.  Set them in fhandler_fifo::open.  ('duplexer'
replaces the previous '_duplexer'.)

This will be useful in later commits.

5 years agoCygwin: FIFO: hit_eof: add a call to fifo_client_lock
Ken Brown [Sun, 14 Apr 2019 19:15:56 +0000 (19:15 +0000)]
Cygwin: FIFO: hit_eof: add a call to fifo_client_lock

The second check of nconnected needs to be protected by a lock as well
as the first.

5 years agoCygwin: FIFO: rename client[] to fc_handler[]
Ken Brown [Sun, 14 Apr 2019 19:15:56 +0000 (19:15 +0000)]
Cygwin: FIFO: rename client[] to fc_handler[]

The word "client" suggests something that holds a handle to the client
side of the pipe (in Windows terminology).  But our
fifo_client_handlers hold a handle the server side of the pipe, and
they *connect* to clients.

5 years agoImplement reduced code size "tiny" printf and puts
Jozef Lawrynowicz [Fri, 12 Apr 2019 11:08:22 +0000 (12:08 +0100)]
Implement reduced code size "tiny" printf and puts

"tiny" printf is derived from _vfprintf_r in libc/stdio/nano-vfprintf.c.
"tiny" puts has been implemented so that it just calls write, without
any other processing.
Support for buffering, reentrancy and streams has been removed from
these functions to achieve reduced code size.

This reduced code size implementation of printf and puts can be enabled
in an application by passing "--wrap printf" and "--wrap puts" to the
GNU linker. This will replace references to "printf" and "puts" in user
code with "__wrap_printf" and "__wrap_puts" respectively.
If there is no implementation of these __wrap* functions in user code,
these "tiny" printf and puts implementations will be linked into the
final executable.

The wrapping mechanism is supposed to be invisible to the user:
- A GCC wrapper option such as "-mtiny-printf" will be added to alias
  these wrap commands.
- If the user is unaware of the "tiny" implementation, and chooses to
  implement their own __wrap_printf and __wrap_puts, their own
  implementation will be automatically chosen over the "tiny" printf and
  puts from the library.

Newlib must be configured with --enable-newlib-nano-formatted-io for
the "tiny" printf and puts functions to be built into the library.

Code size reduction examples:
printf("Hello World\n")
  baseline - msp430-elf-gcc gcc-8_3_0-release
     text    data     bss
   5638     214      26
  "tiny" puts enabled
    text    data     bss
     714      90      20

printf("Hello %d\n", a)
  baseline - msp430-elf-gcc gcc-8_3_0-release
    text    data     bss
   10916     614      28

  "tiny" printf enabled
    text    data     bss
    4632     280      20

5 years agoCopy prerequisite file for "tiny" printf implementation
Jozef Lawrynowicz [Fri, 12 Apr 2019 10:57:59 +0000 (11:57 +0100)]
Copy prerequisite file for "tiny" printf implementation

Use newlib/libc/stdio/nano-vfprintf.c as baseline for tiny-printf.c

5 years agoFix definition of write() to use const char * for the type of the buffer
Jozef Lawrynowicz [Fri, 12 Apr 2019 10:49:11 +0000 (11:49 +0100)]
Fix definition of write() to use const char * for the type of the buffer

5 years agoCygwin: use win pid+threadid for forkables dirname
Michael Haubenwallner [Fri, 12 Apr 2019 13:32:56 +0000 (15:32 +0200)]
Cygwin: use win pid+threadid for forkables dirname

Rather than newest last write time of all dlls loaded, use the forking
process' windows pid and windows thread id as directory name to create
the forkable hardlinks into.  While this may create hardlinks more
often, it does avoid conflicts between dlls not having the newest last
write time.

5 years agoAlign comments and spaces in libgloss/arm/crt0.S and newlib/libc/sys/arm/crt0.S to...
Alexander Fedotov [Thu, 11 Apr 2019 12:28:05 +0000 (15:28 +0300)]
Align comments and spaces in libgloss/arm/crt0.S and newlib/libc/sys/arm/crt0.S to ease further code alignment.

5 years agoInclude code in trap.S for APCS only.
Christophe Lyon [Wed, 10 Apr 2019 15:04:13 +0000 (15:04 +0000)]
Include code in trap.S for APCS only.

The code in trap.S is to support the old APCS chunked stack variant,
which dates back to the Acorn days, so put it under #ifndef
__ARM_EABI__.

* libgloss/arm/trap.S: Use __ARM_EABI rather than PREFER_THUMB.
* newlib/libc/sys/arm/trap.S: Use __ARM_EABI rather than
__thumb2__.

5 years agoMake more macro checks ARMv8-M baseline proof.
Christophe Lyon [Mon, 1 Apr 2019 17:30:53 +0000 (17:30 +0000)]
Make more macro checks ARMv8-M baseline proof.

Commit 69f4c4029183fb26d2fcae00790881620c1978a3 improved most
macro checks to be ARMv8-M baseline proof, but missed a few
occurrences which otherwise fail to build when using a CPU setting
such as cortex-m0 or cortex-m23. This patch brings the same
changes as the ones that were committed to libgloss at that time.

newlib:
* libc/sys/arm/crt0.S: Use THUMB1_ONLY rather than
__ARM_ARCH_6M__.

5 years agoImprove error handling in /proc/[pid]/ virtual files.
Erik M. Bray [Wed, 10 Apr 2019 15:05:22 +0000 (17:05 +0200)]
Improve error handling in /proc/[pid]/ virtual files.

* Changes error handling to allow /proc/[pid]/ virtual files to be
  empty in some cases (in this case the file's formatter should return
  -1 upon error, not 0).

* Better error handling of /proc/[pid]/stat for zombie processes:
  previously trying to open this file on zombie processes resulted
  in an EINVAL being returned by open().  Now the file can be read,
  and fields that can no longer be read are just zeroed.

* Similarly for /proc/[pid]/statm for zombie processes.

* Similarly for /proc/[pid]/maps for zombie processes (in this case the
  file can be read but is zero-length, which is consistent with observed
  behavior on Linux.

5 years agoCygwin: add latest signal handling fixes to release notes
Corinna Vinschen [Sat, 6 Apr 2019 16:03:22 +0000 (18:03 +0200)]
Cygwin: add latest signal handling fixes to release notes

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
5 years agoCygwin: signals: setcontext: fix setting sigmask
Corinna Vinschen [Fri, 5 Apr 2019 10:13:44 +0000 (12:13 +0200)]
Cygwin: signals: setcontext: fix setting sigmask

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
5 years agoCygwin: follow context if changed inside SA_SIGINFO signal handler
Corinna Vinschen [Fri, 5 Apr 2019 09:25:19 +0000 (11:25 +0200)]
Cygwin: follow context if changed inside SA_SIGINFO signal handler

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
5 years agoCygwin: signals: make setcontext work from signal handlers
Corinna Vinschen [Thu, 4 Apr 2019 19:25:47 +0000 (21:25 +0200)]
Cygwin: signals:  make setcontext work from signal handlers

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
5 years agoCygwin: console: fix key input for native console application
Takashi Yano [Wed, 3 Apr 2019 16:25:31 +0000 (01:25 +0900)]
Cygwin: console: fix key input for native console application

- After 24 bit color support patch, arrow keys and function keys
  do not work properly in native console applications if they
  are started in cygwin console. This patch fixes this issue.

5 years agoCygwin: signals: restore sigmask from context given to signal handler
Corinna Vinschen [Wed, 3 Apr 2019 16:14:30 +0000 (18:14 +0200)]
Cygwin: signals: restore sigmask from context given to signal handler

In case SA_SIGINFO flag is given, the signal handler may change
the context and the application is supposed to pick up from the
changed context.  So far we don't do that, so the context given
to the signal handler is basically read-only, unless the signal
handler calls setcontext or swapcontext.

For a start, restore the thread's signal mask from the uc_sigmask
value of the context given to the signal handler.

If that's feasible for Cygwin, we restore the entire context from
the context changed by the signal handler in a followup patch.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
5 years agoAdd a dummy interrupt handler to nios2 crt0.s.
Sandra Loosemore [Wed, 3 Apr 2019 15:59:36 +0000 (09:59 -0600)]
Add a dummy interrupt handler to nios2 crt0.s.

The location of the handler at offset 0x20 from the start of memory,
immediately after the 32-byte reset vector, matches the expectations
of real hardware (e.g., a 3c120 board).

5 years agoCygwin: winpids: Fix getting process multiple times, take 2
Corinna Vinschen [Tue, 2 Apr 2019 11:00:22 +0000 (13:00 +0200)]
Cygwin: winpids: Fix getting process multiple times, take 2

commit d1be0a59d48222d8ea6261ee3e59de2bc3d149e4,
"Cygwin: winpids: Fix getting process multiple times"
fixed duplicate processes in ps -W output, but it fixed
the symptom, not the cause.  It also didn't fix the problem
that the `ps' process itself may show up twice in its own
output.

This patch fixes it.  The spawn worker only deleted the
"winpid.PID" symlink of the current process if the child is
a non-Cygwin process, under the assumption that the exec'ing
process exits anyway.  However, the Window in which both
winpid.PID symlinks point to the same cygpid.PID area is just
too long.  The spawn worker now also deletes its own winpid.PID
symlink if the exec'ed process is a Cygwin process.

Additionally the fix from d1be0a59d48222d8ea6261ee3e59de2bc3d149e4
is now performed on the calling process, too.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
5 years agoCygwin: Add console patches to release notes
Corinna Vinschen [Sun, 31 Mar 2019 17:36:23 +0000 (19:36 +0200)]
Cygwin: Add console patches to release notes

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
5 years agoCygwin: console: Make I/O functions thread-safe
Takashi Yano [Sun, 31 Mar 2019 15:47:48 +0000 (00:47 +0900)]
Cygwin: console: Make I/O functions thread-safe

- POSIX states I/O functions shall be thread-safe, however, cygwin
  console I/O functions were not. This patch makes console I/O
  functions thread-safe.

5 years agoCygwin: console: fix select() behaviour
Takashi Yano [Sun, 31 Mar 2019 15:47:47 +0000 (00:47 +0900)]
Cygwin: console: fix select() behaviour

- Previously, select() would return when only one key is typed even
  in canonical mode. With this patch, it returns after one line is
  completed.

5 years agoCygwin: console: support 24 bit color
Takashi Yano [Sun, 31 Mar 2019 15:47:46 +0000 (00:47 +0900)]
Cygwin: console: support 24 bit color

- Add 24 bit color support using xterm compatibility mode in
  Windows 10 1703 or later.
- Add fake 24 bit color support for legacy console, which uses
  the nearest color from 16 system colors.

5 years agoCygwin: document ps -W duplication bug fix
Corinna Vinschen [Sun, 31 Mar 2019 10:49:26 +0000 (12:49 +0200)]
Cygwin: document ps -W duplication bug fix

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
5 years agoCygwin: [gs]et_io_handle(): renamed to [gs]et_handle().
Takashi Yano [Sat, 30 Mar 2019 07:12:02 +0000 (16:12 +0900)]
Cygwin: [gs]et_io_handle(): renamed to [gs]et_handle().

- Unify get_io_handle() and get_handle() to get_handle().
  Both of them returned same value; io_handle.
- Rename set_io_handle() to set_handle().

5 years agoCygwin: fork: reserve dynloaded dll areas earlier
Michael Haubenwallner [Tue, 26 Mar 2019 16:38:36 +0000 (17:38 +0100)]
Cygwin: fork: reserve dynloaded dll areas earlier

In dll_crt0_0, both threadinterface->Init and sigproc_init allocate
windows object handles using unpredictable memory regions, which may
collide with dynamically loaded dlls when they were relocated.

5 years agoCygwin: FIFO: implement clear_readahead
Ken Brown [Wed, 27 Mar 2019 21:29:21 +0000 (21:29 +0000)]
Cygwin: FIFO: implement clear_readahead

Make fhandler_base::clear_readahead virtual, and implement
fhandler_fifo::clear_readahead.  This is called by
dtable::fixup_after_exec; it clears the readahead in each client.

5 years agoCygwin: document the recent FIFO changes
Ken Brown [Wed, 27 Mar 2019 18:10:18 +0000 (18:10 +0000)]
Cygwin: document the recent FIFO changes

5 years agoCygwin: fix: seteuid32() must return EPERM if privileges are not held.
J.H. van de Water [Wed, 27 Mar 2019 16:01:03 +0000 (17:01 +0100)]
Cygwin: fix: seteuid32() must return EPERM if privileges are not held.

Starting w/ the intro of S4U, seteuid32() calls lsaprivkeyauth(), then
s4uauth(). s4uauth calls LsaRegisterLogonProcess().
LsaRegisterLogonProcess fails w/ STATUS_PORT_CONNECTION_REFUSED, if the
proper privileges are not held.
Because of RtlNtStatusToDosError(), this status would be mapped to
ERROR_ACCESS_DENIED, which in turn would map to EACCES. Therefore it is
useless to add this status to errmap[] (errno.cc), as s4auauth() should
return EPERM as errno here (i.e. if process is not privileged).

Hence the kludge.

Before the intro of S4U, seteuid32() called lsaprivkeyauth(), then
lsaauth(), then create_token(). Before the intro of Vista, the latter
would have called NtCreateToken().
NtCreateToken() would have failed w/ STATUS_PRIVILEGE_NOT_HELD for a
process w/o the proper privileges. In that case, calling seteuid32()
would have returned EPERM (as required).

Since the intro of Vista, and if the process had been started from an
UNelevated shell, create_token() does NOT reach NtCreateToken()!
As create_token() failed to properly set errno in that case, calling
seteuid32() would return errno as set by lsaauth(), i.e. EACCES, not
in agreement w/ Posix (a bug which was present for years).
(lsaauth() called LsaRegisterLogonProcess() which would fail)

5 years agoCygwin: FIFO: add support for the duplex case
Ken Brown [Mon, 25 Mar 2019 23:06:10 +0000 (23:06 +0000)]
Cygwin: FIFO: add support for the duplex case

If a FIFO is opened with O_RDWR access, create the pipe with
read/write access, and make the first client have the handle of that
pipe as its I/O handle.

Adjust fhandler_fifo::raw_read to account for the result of trying to
read from that client if there's no data.

5 years agoCygwin: FIFO: avoid crashes when cloning a client
Ken Brown [Mon, 25 Mar 2019 23:06:09 +0000 (23:06 +0000)]
Cygwin: FIFO: avoid crashes when cloning a client

fhandler_fifo::clone called fhandler_base::clone on each client
fhandler.  But those fhandlers are actually fhandler_fifo objects, so
when fhandler_base::clone calls copyto, it's actually
fhandler_fifo::copyto that gets called.  This can lead to mysterious
crashes.

Fix this by simply calling clone (which translates to
fhandler_fifo::clone) on each client fhandler.

5 years agoCygwin: FIFO: update select
Ken Brown [Fri, 22 Mar 2019 19:30:41 +0000 (19:30 +0000)]
Cygwin: FIFO: update select

Add static functions peek_fifo, thread_fifo, start_thread_fifo, and
fifo_cleanup to select.cc.  These are based on the corresponding pipe
functions, the main difference being that peek_fifo loops through the
connected clients to see if any of them have data available for
reading.

Add the fhandler_fifo methods select_read, select_write, and
select_except.

Add accessor methods get_nclients, get_handle, and is_connected that
are needed by peek_fifo.

5 years agoCygwin: FIFO: update set_close_on_exec
Ken Brown [Fri, 22 Mar 2019 19:30:40 +0000 (19:30 +0000)]
Cygwin: FIFO: update set_close_on_exec

Deal with each client.

5 years agoCygwin: FIFO: update fixup_after_fork
Ken Brown [Fri, 22 Mar 2019 19:30:40 +0000 (19:30 +0000)]
Cygwin: FIFO: update fixup_after_fork

Fixup each client.  Reset listen_client_thr and lct_termination_evt.

5 years agoCygwin: FIFO: update clone and dup
Ken Brown [Fri, 22 Mar 2019 19:30:39 +0000 (19:30 +0000)]
Cygwin: FIFO: update clone and dup

Deal with all clients.

5 years agoCygwin: FIFO: improve EOF detection
Ken Brown [Fri, 22 Mar 2019 19:30:38 +0000 (19:30 +0000)]
Cygwin: FIFO: improve EOF detection

Add a hit_eof method that tries to detect whether any clients are
connected.  Before concluding that there are none, it gives the
listen_client thread time to update the client data.

5 years agoCygwin: FIFO: add a spinlock
Ken Brown [Fri, 22 Mar 2019 19:30:38 +0000 (19:30 +0000)]
Cygwin: FIFO: add a spinlock

Don't let listen_client_thread and raw_read access the client list
simultaneously.

5 years agoCygwin: FIFO: allow multiple writers
Ken Brown [Fri, 22 Mar 2019 19:30:37 +0000 (19:30 +0000)]
Cygwin: FIFO: allow multiple writers

Introduce a 'fifo_client_handler' structure that can be used by a
reader to communicate with a writer using an instance of the named
pipe.  An fhandler_fifo opened for reading creates a thread that does
the following:

 - maintains a list of fifo_client_handlers
 - listens for_clients trying to connect
 - creates new pipe instances as needed so that there's always at
   least one available for connecting.

The pipe instances are initially created in blocking mode, but they
are set to be non-blocking after a connection is made.

fhandler_fifo::raw_read now loops through the connected clients and
reads from the first one that has data available.

New fhandler_fifo methods: add_client, listen_client,
listen_client_thread, check_listen_client_thread.

Replace the create_pipe method by create_pipe_instance, which allows
unlimited pipe instances.

New helper functions: create_event, set_pipe_non_blocking.

5 years agoCygwin: FIFO: stop using overlapped I/O
Ken Brown [Fri, 22 Mar 2019 19:30:36 +0000 (19:30 +0000)]
Cygwin: FIFO: stop using overlapped I/O

Make fhandler_fifo a derived class of fhandler_base instead of
fhandler_base_overlapped.

Replace the create_pipe macro, which is based on
fhandler_pipe::create, by new create_pipe and open_pipe methods.
These use NT functions instead of Win32 functions.  Replace fifo_name
by get_pipe_name, which returns a pointer to a UNICODE_STRING.

Remove the fnevent macro, which would now be needed only once.

Add a raw_write method, adapted from fhandler_base::raw_write.

Adapt all functions to the changes above.

5 years agoCygwin: Bump DLL version to 3.1
Corinna Vinschen [Wed, 27 Mar 2019 13:01:17 +0000 (14:01 +0100)]
Cygwin: Bump DLL version to 3.1

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
5 years agoCygwin: winpids: Fix getting process multiple times
Corinna Vinschen [Wed, 27 Mar 2019 12:53:32 +0000 (13:53 +0100)]
Cygwin: winpids: Fix getting process multiple times

Switching to Cywin-only PIDs introduced a new problem when collecting
Cygwin processes for `ps -W': A process can show up multiple times
again, if the Cygwin procinfo has been opened for a just execing
process.  The execed process then shows up twice, once as Cygwin
process, but with the wrong Windows PID of the execing process,
once as Windows-only process.

The mechanism used to exclude these stray processes didn't work with
the new Cygwin pid handling anymore.  To fix this

* check if the incoming Windows PID is the same as the PID in the
  procinfo.  If not, we have the PID of the execing process while
  procinfo was already changed,
* always check if the process has already been handled, not only
  for processes we got a procinfo for,
* simplify adding pid to pidlist since pid is now always correct.

While at it, fix comments and comment formatting.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
5 years agoAdd missing includes.
Andrew Stubbs [Mon, 25 Mar 2019 15:33:53 +0000 (15:33 +0000)]
Add missing includes.

These missing includes were causing build warnings, but also a real bug in
which the "size" parameter to "write" was being passed in 32-bit, whereas it
ought to be 64-bit.  This led to intermittent bad behaviour.

5 years agoget and convert boot time once and use as needed
Brian Inglis [Sun, 24 Mar 2019 02:22:39 +0000 (20:22 -0600)]
get and convert boot time once and use as needed

5 years agodefault ps -W process start time to system boot time when inaccessible, 0, -1
Brian Inglis [Sun, 24 Mar 2019 02:22:38 +0000 (20:22 -0600)]
default ps -W process start time to system boot time when inaccessible, 0, -1

This page took 0.099917 seconds and 5 git commands to generate.