Commit graph

234 commits

Author SHA1 Message Date
Roman Chistokhodov
91877266e3 Add unittest for using malformed executable in spawnProcess 2017-05-29 22:52:34 +03:00
Roman Chistokhodov
4b440f742f Track errors that may happen in forked process on Posix 2017-05-29 21:39:16 +03:00
Roman Chistokhodov
8807639ff5 Make behavior of environment.opIndexAssign on Posix to match the behavior
on Windows.

Setting null as environment value leads to removing this variable
according to SetEnvironmentVariable documentation while Posix leaves
unspecified what setenev should do if value is null.
2017-05-08 22:29:12 +02:00
Sebastian Wilzbach
a2c6398332 Automatically add spaces to binary operators (==)
command:

sed -E "s/([[:alnum:]]) == ([[:alnum:]])/\1 == \2/g" -i **/*.d
sed -E "s/([[:alnum:]])== ([[:alnum:]])/\1 == \2/g" -i **/*.d
sed -E "s/([[:alnum:]]) ==([[:alnum:]])/\1 == \2/g" -i **/*.d
2017-02-23 00:57:47 +01:00
Sebastian Wilzbach
425ab667a3 Automatically set the range style from a..b -> a .. b
Commands:

sed -E "s/([[:alnum:]])[.][.]([[:alnum:]])/\1 .. \2/g" -i **/*.d
sed -E "s/([[:alnum:]])[.][.] ([[:alnum:]])/\1 .. \2/g" -i **/*.d
sed -E "s/([[:alnum:]]) [.][.]([[:alnum:]])/\1 .. \2/g" -i **/*.d
2017-02-22 05:37:31 +01:00
Sebastian Wilzbach
805c720595 Unify Phobos by ensuring there's always a space after cast(...)
Command:

sed -E 's/([^"])cast\(([^)]*?)\)([[:alnum:]])/\1cast(\2) \3/g' -i **/*.d
2017-02-21 16:40:20 +01:00
Sebastian Wilzbach
5521541032 Unify assert style to have no spaces between the first brace
Application of:

sed -E "s/assert +\(/assert(/" -i **/*.d
2017-02-21 15:27:15 +01:00
The Dlang Bot
10a149aac4 Merge pull request #4941 from John-Colvin/opIn_environment
add opIn for std.process.environment
merged-on-behalf-of: Sebastian Wilzbach <sebi.wilzbach@gmail.com>
2017-02-21 12:54:35 +01:00
John Colvin
8e5fcc82dd asserts without space 2017-02-21 10:14:15 +00:00
Sebastian Wilzbach
87dec58a41 DStyle: Constraints on declarations should have the same indentation level 2017-02-17 07:36:23 +01:00
John Colvin
d9541bf90c remove trailing whitespace 2017-01-31 13:27:03 +00:00
John Colvin
5f1eb1b4eb warn about glibc & changing environment variables 2017-01-31 10:42:44 +00:00
Steven Schveighoffer
48de5c1cca Merge pull request #4948 from John-Colvin/test_inheritFDs
test inheritFDs
2017-01-16 07:11:34 -05:00
John Colvin
17df5f2522 test std{in,out,err} and improve comments 2016-12-18 13:43:08 +00:00
John Colvin
8e5d4c39c2 test inheritFDs 2016-12-17 16:19:30 +00:00
John Colvin
dfbfac621f add opIn for std.process.environment 2016-12-16 16:42:17 +00:00
Vladimir Panteleev
3f8298e853 Merge pull request #4939 from John-Colvin/patch-19
use WindowsException for errors from windows api
2016-12-15 14:11:15 +03:00
Steven Schveighoffer
43a4d2cc1e Merge pull request #4934 from John-Colvin/fix_spawn
Fix Issue 16955 - std.process.spawnProcessImpl can crash due to alloca
2016-12-11 14:12:53 -05:00
John Colvin
aec837beca Fix Issue 16955 - std.process.spawnProcessImpl can crash due to alloca 2016-12-09 16:39:09 +00:00
John Colvin
73242a329f add explanatory comment in environment unittest 2016-12-09 16:07:03 +00:00
John Colvin
68b1ab0ae1 use WindowsException for errors from windows api 2016-12-09 16:05:41 +00:00
John Colvin
fe29c5ba51 cosmetics 2016-12-09 00:35:07 +00:00
John Colvin
bbf8f2ab59 move to infinite looping to get env var 2016-12-08 21:47:43 +00:00
John Colvin
37849e1c93 harden window get environment variables 2016-12-08 21:45:54 +00:00
Martin Nowak
ebbdf21a7e fix Issue 16580 - spawnShell segfaults on macOS
- partially Revert "Merge pull request #4493 from schveiguy/fixcycles2"
- recreate processinit (and import it from std.process)
  to call std.process shared ctor w/o creating a cycle
- keep it separate from phobosinit to not drag std.encoding
  into any binary using std.process
2016-10-04 23:56:38 +02:00
Jack Stouffer
e9316b4efd Remove package wide std.algorithm imports from std.process 2016-09-16 10:36:44 +01:00
Jonathan M Davis
5c2be71132 Move deprecations along. 2016-09-07 00:15:29 -07:00
Tony Tung
f81ddfb5e3 Properly handle the case where an environment variable is an empty string.
v.idup returns null when called on an empty but non-null array.  This is
undesirable because we want to differentiate between not-present and
empty-but-present.
2016-07-25 10:47:08 -07:00
Walter Bright
782e5399ea Merge pull request #4455 from JackStouffer/file
Remove some global imports from std.file
2016-07-08 20:26:52 -07:00
Jack Stouffer
bb13820459 [std.file] Removed global std.conv and std.path imports 2016-07-08 09:04:10 -04:00
David Nadlinger
c33f3862b7 Merge pull request #4493 from schveiguy/fixcycles2
Fix cycles in Phobos
2016-07-06 00:06:11 +01:00
Atila Neves
9861693bfb Add @system and @safe to std.process unit tests 2016-07-04 17:41:31 +02:00
Jack Stouffer
2bc85ac4a2 Removed global core.sys.posix.stdio import from std.process 2016-07-04 02:17:59 -04:00
Jack Stouffer
ecb5c4b9e6 Removed global core.stdc.errno import from std.process 2016-07-04 02:17:59 -04:00
Jack Stouffer
ed05655893 Removed global core.stdc.string import from std.process 2016-07-04 02:17:59 -04:00
Jack Stouffer
fd1afb27b2 Removed global std.exception import from std.process 2016-07-04 02:17:57 -04:00
Jack Stouffer
703566e28e Removed global std.path import from std.process 2016-07-03 16:07:45 -04:00
Jack Stouffer
1aa7eee00a Removed global std.conv import from std.process 2016-07-03 16:04:21 -04:00
Jack Stouffer
687c07e323 Fixed local imports in std.process 2016-07-01 12:27:31 -04:00
Steven Schveighoffer
df168487fc Fix cycles in Phobos 2016-06-28 15:00:01 -04:00
Sebastian Wilzbach
ec47ac4224 Remove the WEB macro in favor of HTTP
replacement: sed 's/\$(WEB/\$(HTTP/g' -i **/*.d
2016-06-16 00:14:51 +02:00
anonymous
7b6745727b Ddoc: CXREF -> REF (sed)
Done by:

arg='\s*([^(),]*)'
from='\$\(CXREF\s'$arg','$arg'\)'
to='$(REF \2, core,\1)'
(find . -type f -name "*.d" -print0; \
    find . -type f -name "*.dd" -print0) | \
xargs -0 sed -i -r "s/$from/$to/g"
2016-06-08 00:22:03 +02:00
Sebastian Wilzbach
2dfbc51f17 Standardize whitespace after imports
Unified with:

sed -E "s/import\s*([^ ]+)\s*:\s*(.*(,|;))/import \1 : \2/" -i **/*.d
2016-05-29 22:09:56 +02:00
anonymous
764caefa36 XREF -> REF (sed)
Done by:

(find . -type f -name "*.d" -print0; \
    find . -type f -name "*.dd" -print0) | \
xargs -0 sed -i -r \
    's/\$\(XREF\s+([^(),]*),\s*([^(),]*)\)/$(REF \2, std,\1)/g'
2016-05-27 21:32:46 +02:00
Vladimir Panteleev
cae4923372 Merge pull request #4369 from wilzbach/deprecate_wiki
remove the deprecated wiki macros
2016-05-27 08:19:55 +03:00
Sebastian Wilzbach
18b8abf60a remove the deprecated wiki macros 2016-05-27 05:52:23 +02:00
Robert Schadek
0d33ee0706 Merge pull request #4298 from CyberShadow/fork-nogc
std.process: Enforce nothrow/@nogc in forks
2016-05-26 19:02:13 +02:00
H. S. Teoh
eb3d9d24f4 Merge pull request #4305 from CyberShadow/pull-20160510-183209
std.process: Disambiguate fork call on OS X
2016-05-10 20:13:03 -07:00
Vladimir Panteleev
b7f0a17300 std.process: Disambiguate fork call on OS X 2016-05-11 01:54:29 +00:00
Vladimir Panteleev
3636733dcc Merge pull request #4299 from JackStouffer/patch-6
Prepare for long line checks in travis
2016-05-11 04:36:15 +03:00