Commit Graph

174 Commits

Author SHA1 Message Date
Araq
4b350d2632 osproc: fixes a memory leak affecting Windows 2017-09-30 15:36:13 +02:00
araq
85dc40c121 fixes #1734, fixes #3138, fixes #3759 2017-09-01 19:25:08 +02:00
Fredrik Høisæther Rasch
c39e202976 Introduce first class support for Android (#5772) 2017-08-06 02:18:15 +02:00
Ruslan Mustakov
0a76387ba4 Fix posix_spawn error handling (#5826)
posix_spawn doesn't set errno - it returns the error code.
2017-05-17 22:40:55 +02:00
Dominik Picheta
fa3436fb65 Deprecate osproc.select(). Refs #90. 2017-05-09 15:14:47 +01:00
Jacek Sieka
0055729755 WIFSIGNALED means process has exited too (with a bang!) (#5678) 2017-04-27 21:39:32 +02:00
Eugene Kabanov
d701de5733 Fix osproc.peekExitCode() to handle exitcode properly. (#5555) 2017-03-17 10:02:36 +01:00
Eugene Kabanov
336a7c9b3f Fixes to support Dragonfly BSD. (#5552)
* Fix kqueue.nim and ansi_c.nim to support dragonfly.
* Fix ioselectors.nim, threads.nim to support dragonfly.
* Fix deprecated dealloc call in tioselectors.nim.
* Fix tfsmonitor.nim test to run only on Linux.
* Fix osproc.nim return wrong exit codes.
* Fix getAppFilename() for dragonfly.
* Fix proper exit code handling.
2017-03-17 08:22:11 +01:00
Araq
92ecbc9958 fixes #5179 2017-01-07 03:05:48 +01:00
Johannes Hofmann
95188edf6f make sure first call to running() after process exit returns false 2016-12-03 14:07:08 +01:00
Johannes Hofmann
b453a8e616 check waitpid() return value before setting exitStatus
This fixes a race with parallelBuild on DragonFly BSD.
2016-12-02 22:24:42 +01:00
Andreas Rumpf
0a6787f956 better error handling for osproc.nim 2016-11-05 09:04:16 +01:00
cheatfate
0c69891b8d One more attempt to fix #4867 2016-10-21 11:15:33 +03:00
Johannes Hofmann
52db21bb2c convert exitStatus to exit code 2016-09-30 10:19:57 +02:00
Johannes Hofmann
1dccbaf9a0 another attempt at properly declaring the status variable 2016-09-25 10:16:14 +02:00
Johannes Hofmann
14f72bcbac make status variable local 2016-09-25 09:51:23 +02:00
Johannes Hofmann
829b706440 rename exitCode to exitStatus 2016-09-24 14:46:07 +02:00
Johannes Hofmann
5986b78bbe generally update exitCode only after successful completion of waitpid() 2016-09-22 10:55:21 +02:00
Johannes Hofmann
93160547a9 reset p.exitCode in peekExitCode on Posix when process did not exit (#4793)
* reset p.exitCode in peekExitCode on Posix when process did not exit

fixes #4792

* fix indentation
2016-09-17 22:03:14 +02:00
Dominik Picheta
5784e43662 Add warning to osproc.close 2016-07-21 16:14:00 +01:00
Dmitry Polienko
46dad3cb6b Fix environment handling in startProcess 2016-07-19 20:38:00 -07:00
Dmitry Polienko
9bd952d2c2 Revert changes in osproc.nim 2016-07-19 20:33:25 -07:00
Dmitry Polienko
5f773bf478 Fix passing environment in startProcess (win)
Previous implementation used newWideCString, which doesn't
handle strings with \0 characters.
2016-07-18 23:28:40 -07:00
Andreas Rumpf
0834cd63d9 prepare Nim codebase for upcoming parser changes 2016-07-15 12:56:03 +02:00
Andreas Rumpf
82a75635f7 installer fixes and improvements 2016-06-07 13:47:37 +02:00
cheatfate
d4f3db3bd0 Resolve bugs 2016-05-24 01:37:31 +03:00
cheatfate
b27ee842d4 Resolve #4200
Resolve [Deprecated] warning for raiseOsError at line 878
2016-05-24 00:33:05 +03:00
def
bf8e371d7e Revert raiseOSError change 2016-02-06 01:29:12 +01:00
def
c50b5b62ef Fix a few deprecation warnings 2016-01-25 19:10:37 +01:00
def
4246f660ea Only use execvpe on linux, execvp elsewhere (fixes #3759) 2016-01-24 19:18:16 +01:00
Yuriy Glukhov
dee5f9ad4f osproc fix for Android 2016-01-04 12:52:54 +02:00
def
25e862b9bc Fix osproc compilation on NetBSD, use workaround for missing execvpe 2015-12-23 05:56:42 +01:00
wt
696b89c111 Fix osproc.close 2015-11-10 11:13:04 +08:00
Andreas Rumpf
ba63ea9e82 Merge pull request #3454 from jlp765/osproc
add simple example for execProcess, exeCmd, execCmdEx
2015-10-23 02:01:26 +02:00
Araq
c977daf9d8 added poDemon flag for process management 2015-10-19 16:09:34 +02:00
JamesP
f596e8145d add simple example for execProcess, exeCmd, execCmdEx 2015-10-16 23:13:14 +10:00
Araq
dfaa63e805 osproc: fixes a long standing buffering bug on Windows 2015-10-07 10:03:46 +02:00
Aman Gupta
9f33baf51b add afterRunEvent callback to execProcesses 2015-09-30 19:02:23 -07:00
Araq
27bdf5c45c osproc: free resources properly for the new poInteractive flag 2015-09-29 20:00:28 +02:00
Araq
5f7ad9131f added osproc.poInteractive and osproc.hasData; both experimental 2015-09-29 19:30:47 +02:00
Adam Strzelecki
a9f114cf13 osproc: Define and select spawn/fork same way
Previously startProcessAuxFork was defined even when it was unused, also the
compile time condition to select spawn vs fork was not always the same for
definitions and calls.

This change just defines the condition in one place as constant, then in other
places we just check for `when useProcessAuxSpawn`.
2015-09-03 18:00:15 +02:00
Dominik Picheta
9b0ac8afa8 Improves osproc.startProcess error message on POSIX. Ref #2183. 2015-08-23 22:07:37 +01:00
Dominik Picheta
1b73cd41bf Improves osproc.startProcess error message. Fixes #2183. 2015-08-23 21:57:45 +01:00
Araq
2297a1aa60 much better error message if an exe cannot be found 2015-06-29 02:48:31 +02:00
Araq
ccb9ae2d52 stdlib: don't use deprecated symbols 2015-06-04 13:18:42 +02:00
pdw
6914244f30 lib/pure/e-o - Dropped 'T' from types 2015-06-04 13:18:35 +02:00
pdw
cb6f867495 Fixed 'milliseconds' spelling in code and docs 2015-05-15 20:15:12 -05:00
Jochen Van de Velde
86c9fffc41 Fix osproc documentation 2015-05-13 18:19:51 +02:00
def
2025a0f482 Make peekExitCode on Posix use WIFEXITED to determine exit
This fixes #2552
2015-04-14 12:58:17 +02:00
yglukhov
5793449b5a Doc fix: TProcessOption -> ProcessOption 2015-04-03 13:38:10 +03:00