Commit graph

235 commits

Author SHA1 Message Date
Andreas Rumpf
6e08ae5c26 merged patch #6876 manually, taking care of poDemon 2017-12-11 11:57:21 +01:00
Andreas Rumpf
8646a56738 Merge branch 'nexecProcesses' of https://github.com/cheatfate/Nim into cheatfate-nexecProcesses 2017-12-01 02:06:51 +01:00
cheatfate
fbe0ae74fb Explicit array initialization removed. 2017-11-29 03:57:29 +02:00
cheatfate
c4a57e711b Fix nimrtl troubles. 2017-11-28 14:40:33 +02:00
cheatfate
c6c0d28a4f Refactored version of execProcesses with test. 2017-11-28 14:03:09 +02:00
Araq
439b72b402 osproc improvement: check API consistency in order to prevent bug #6820 2017-11-28 02:19:39 +01:00
Fredrik Høisæther Rasch
f6a8cba7b5 Move quoteShell to ospaths (#6794)
Enables quoteShell on nimscript
2017-11-24 14:42:59 +01:00
Lynn C. Rees
0ab373115c Trim remaining expr/stmt from stdlib (#6742) 2017-11-15 17:34:48 +01:00
Fredrik Høisæther Rasch
de97f381fa Fix path for sh on Android (#6661) 2017-11-03 21:09:01 +01:00
Andreas Rumpf
c4dcbb45f4 osproc.execProcesses: enable poParentStreams for posix; should make travis green again 2017-10-26 09:19:18 +02:00
Araq
ea535ed1ff osproc on Windows: fix peekExitCode for closed processes 2017-10-25 17:37:03 +02:00
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