41 Commits

Author SHA1 Message Date
Vadim Godunko
53bd2349f9 Disable RPATH generation for libraries 2026-01-26 15:15:10 +04:00
Andry Ogorodnik
bc386ca20f Load stdout when a process died
On Windows we have an issue when not all data is loaded from
 the output pipe when a process terminates.

For eng/ide/gnatstudio#482
2025-01-28 15:37:09 +01:00
Andry Ogorodnik
a47e0aa756 Fixing issues
- correct Append_Escaped_String to qoute arguments with spaces
- add Windows OS buffer for pipe to speedup reading
- fixing the monitor to set proper status when process can't be started
- fixing tests
- added new test for arguments quouting

(no-tn-check)
2025-01-07 15:03:37 +01:00
Rowan Walshe
91387d887b Wrap external parameter OS with SPAWN_OS, as OS can clash with other projects 2023-08-04 14:29:11 +01:00
Maxim Reznik
eda1b9d167 Enable use of Ada 2022 by Alire. 2023-05-12 18:18:31 +03:00
Maxim Reznik
40d94c4042 Fix compilation on Mac OS X. 2023-04-28 19:10:43 +03:00
Vadim Godunko
0e4d3960a8 Exclude Windows specific file on POSIX platforms. 2023-04-04 11:38:07 +04:00
Vadim Godunko
20ef5250b9 Support setting of Spawn specific library type. 2023-04-04 08:32:07 +03:00
Maxim Reznik
e03c6e903c Add a testcase for invalid executable launch. 2023-03-07 13:40:18 +02:00
Maxim Reznik
23b154cf57 Fix waiting for several processes. Add the test.
SIGCHLD signal could be triggered for several exited children. So
let's call waitpid untill no more children change state.

Fix #30
2023-02-10 18:05:47 +02:00
Maxim Reznik
38891f5777 W102-006 Exclude POSIX Poll from Windows project files.
Copy Close_IO flag to spawn-internal__glib_windows.ads.
2023-01-02 16:19:41 +02:00
Maxim Reznik
7f5d947b8a Add a test for TTY support 2022-12-22 12:21:24 +02:00
Maxim Reznik
fc7b2215c6 Create POSIX version of Spawn.Channels
to have similar package structure on POSIX and POSIX+Glib platforms.
2022-12-22 12:21:24 +02:00
Maxim Reznik
30c4c83668 Restructure implementation types/packages hierarchy
* Move `Process_Listener` to a dedicated package.

* Make `Spawn.Processes.Process` as a wrapper for
  `Spawn.Internal.Process` to hide internal details from a user.

* Make `Spawn.Internal.Process` API compatible/equal to
  `Spawn.Processes.Process`. Inherit all implementation from
  `Spawn.Common.Process` and move common trivial functionality
  there.

* Move other logic from Process.Platform packages to corresponding
  `Spawn.Internal` package.

* Move `Spawn.Process.Monitor` to `Spawn.Internal.Monitor`.
2022-12-16 17:36:28 +02:00
Maxim Reznik
cca62ccc96 V616-017 Do the best to finalize process objects.
On Glib+Windows close pipes and cancel death notification.
On non-glib - raise Program_Error if process is running,
because the monitor keeps process object references.
2022-09-26 16:44:48 +03:00
Vadim Godunko
af9e8a7f25 V513-017 Initial support for PTY on POSIX systems/Glib. 2022-09-26 16:44:48 +03:00
Vadim Godunko
2aefd03f0b V513-017 Code refactoring to remove duplicated code. 2022-09-26 16:44:48 +03:00
Maxim Reznik
0304ef5347 Change license headers to Apache 2.0 2022-06-22 11:04:15 +03:00
Nicolas Setton
9c3efec880 Add a build mode for AddressSanitizer 2021-08-26 06:51:30 +00:00
Maxim Reznik
28115620eb U505-038 Implementation of Kill/Terminate for POSIX 2021-05-20 21:17:46 +03:00
Vadim Godunko
6e60f0dde8 U318-015 Add "superproject" support. 2021-04-08 15:29:53 +03:00
Maxim Reznik
9ab2c93b39 Add extra "-lglib-2.0" Library_Options
for relocatable libraries build. Closes #8.
2021-04-07 20:32:13 +03:00
Maxim Reznik
e57c59da4e Replace Build_Kind with Spawn_Build_Kind
to avoid name clash with gprinstall generated code.
2021-03-08 15:44:13 +02:00
Maxim Reznik
a2354d1700 Change default BUILD_MODE to prod for the Spawn
This is more appropriate mode for an `alire` user.
2021-02-24 13:13:03 +02:00
Maxim Reznik
c2a06cf5de TB23-030 Fix building libspawn.dll on Windows
when LIBRARY_TYPE=relocatable
2021-01-13 09:30:38 +02:00