Commit Graph

492 Commits

Author SHA1 Message Date
Klemens David Morgenstern
92d2bebaaf added test and fixed #189 and #157 as well as #93 2019-04-06 18:25:08 +08:00
Klemens David Morgenstern
1b476b0430 Closes #65 2019-04-06 15:21:52 +08:00
Klemens David Morgenstern
b294710e60 fixed self-pipe issue 2019-04-06 14:42:08 +08:00
Klemens David Morgenstern
b8821eac57 should close #78 2019-03-30 23:14:25 +08:00
Klemens David Morgenstern
d20b64cf37 removed unnecessary int to remove warning 2019-03-29 01:39:00 +08:00
Klemens David Morgenstern
f0ddd6ca29 typo & structure fix 2019-03-29 00:57:11 +08:00
Klemens David Morgenstern
574d9e09d6 should close #193 2019-03-29 00:32:12 +08:00
Klemens Morgenstern
7085a50f36
Merge pull request #77 from SimonEbner/develop
Fix leaking pipe
2019-03-23 00:01:27 +08:00
Simon Ebner
318439af2e Fix Issue 62
Fixes a leaking pipe. See https://github.com/boostorg/process/issues/62
2019-03-22 15:27:35 +01:00
Orgad Shaneh
4d52ff362f Fix signed/unsigned comparison 2019-03-21 23:39:27 +02:00
Klemens David Morgenstern
14b294c10c Merge branch 'develop' of github.com:boostorg/process into develop 2019-03-04 12:14:56 +08:00
Klemens David Morgenstern
eed0505f6e trying to fix the windows build 2019-02-24 21:26:34 +08:00
Klemens David Morgenstern
355d20faf3 update async pipe executor assignment 2019-02-24 00:51:44 +08:00
Klemens David Morgenstern
15c4a64a81 updated asio fwd 2019-02-23 23:38:20 +08:00
Lieven de Cock
c1ad9d1227 fix warning due to extra semi colon
In file included from /home/ldco/boost/include/boost/process/detail/on_exit.hpp:12:0,
                 from /home/ldco/boost/include/boost/process/async.hpp:33,
                 from /home/ldco/boost/include/boost/process.hpp:23,
                 from /home/ldco/Projects/Teaching/Teaching/Boost/Process/Process1/src/main.cpp:7:
/home/ldco/boost/include/boost/process/detail/posix/on_exit.hpp:30:6: warning: extra ‘;’ [-Wpedantic]
     };
      ^
In file included from /home/ldco/boost/include/boost/process/async.hpp:42:0,
                 from /home/ldco/boost/include/boost/process.hpp:23,
                 from /home/ldco/Projects/Teaching/Teaching/Boost/Process/Process1/src/main.cpp:7:
/home/ldco/boost/include/boost/process/detail/posix/io_context_ref.hpp:67:6: warning: extra ‘;’ [-Wpedantic]
     };
      ^
2019-01-29 12:57:43 +01:00
Klemens David Morgenstern
b4584dd0b0 Merge branch 'develop' of github.com:boostorg/process into develop 2019-01-08 15:02:17 +08:00
Klemens Morgenstern
55e5d178bd
Merge pull request #67 from amensel/develop
Use the non-deprecated ASIO APIs.
2019-01-07 17:30:48 +07:00
Klemens David Morgenstern
f778702257 closes #188 2019-01-07 17:12:58 +07:00
Klemens David Morgenstern
b4ff07cfcb fixed BOOST_NO_ANSI_APIS issue in basic_pipe, closed #26 2019-01-07 17:03:00 +07:00
Adam Mensel
d43858078f Use the non-deprecated function name. 2019-01-04 15:32:38 -07:00
Adam Mensel
f2cf918be5 Missed one post call. 2019-01-04 15:24:28 -07:00
Adam Mensel
54dd027a64 Use the non-deprecated ASIO APIs. 2019-01-04 11:57:47 -07:00
Klemens David Morgenstern
1ea894ab30 Closes #187 2018-12-15 11:37:51 +07:00
Klemens David Morgenstern
97f08ba0b3 Merge remote-tracking branch 'remotes/origin/master' into develop
# Conflicts:
#	doc/tutorial.qbk
2018-12-14 12:17:17 +07:00
Klemens David Morgenstern
a6e5a5a619 typoe fix 2018-12-13 11:45:48 +07:00
Klemens David Morgenstern
2d627f633b added group_wait 2018-12-12 00:19:14 +07:00
Klemens David Morgenstern
ef486764ac added check if forked proc is running 2018-12-11 23:13:20 +07:00
Klemens David Morgenstern
fce3962376 WNOHANG test 2018-12-11 21:58:17 +07:00
Klemens David Morgenstern
5a40a0ee9c typo fix 2018-12-11 18:24:25 +07:00
Klemens David Morgenstern
4bf795922d trying nanosleep 2018-12-11 18:05:24 +07:00
Klemens David Morgenstern
1646b240c7 trying to fix wait_for 2018-12-11 17:19:37 +07:00
Klemens Morgenstern
bae6098e91
Merge pull request #186 from jasonmccampbell/native-exit-code
Allow access to the uninterpreted exit code
2018-12-11 10:15:50 +07:00
Jason McCampbell
c40153fab1 Allow access to the uninterpreted exit code to allow calls to
distinugish between exit codes and exit due to signals (POSIX)
2018-12-11 02:41:27 +00:00
Klemens David Morgenstern
887bb8c482 removed notify_fork again 2018-12-11 00:41:47 +07:00
Klemens David Morgenstern
ea24ebaf92 added notify fork back into io_context_ref 2018-11-15 15:07:34 +07:00
Klemens David Morgenstern
191673b049 updated waitpid functionality 2018-11-15 11:51:33 +07:00
Klemens David Morgenstern
3a6d11f9b8 damn typos 2018-11-15 11:22:43 +07:00
Klemens David Morgenstern
e022ad3742 typo fix, again 2018-11-15 11:06:09 +07:00
Klemens David Morgenstern
16d9350992 typo fix 2018-11-15 10:51:29 +07:00
Klemens David Morgenstern
5e1d7b6901 updated sigchld_service to check first check if the child is actually running 2018-11-15 10:35:52 +07:00
Klemens David Morgenstern
4ced4d0933 typo fix in wait functions 2018-11-13 13:52:17 +07:00
Klemens David Morgenstern
5b2d5c76c8 nsleep -> nanosleep 2018-11-12 18:59:18 +07:00
Klemens David Morgenstern
2c3c9e84a5 added include of unistd.h 2018-11-12 18:40:48 +07:00
Klemens David Morgenstern
ad90ca6366 CI fixes and attempt on new wait_for mechanic
Squashed commit of the following:

commit 88952f0ab2
Author: Klemens David Morgenstern <klemens.morgenstern@gmx.net>
Date:   Mon Nov 12 18:27:04 2018 +0700

    rolling back the --coverage option

commit 29cd54ea8c
Author: Klemens David Morgenstern <klemens.morgenstern@gmx.net>
Date:   Mon Nov 12 18:12:33 2018 +0700

    another attempt

commit c2ee6da367
Author: Klemens David Morgenstern <klemens.morgenstern@gmx.net>
Date:   Mon Nov 12 17:54:53 2018 +0700

    trying to get the sanitization to work here

commit 317801ca5e
Author: Klemens David Morgenstern <klemens.morgenstern@gmx.net>
Date:   Mon Nov 12 17:10:36 2018 +0700

    added -lprofile_rt

commit 3923da14f7
Author: Klemens David Morgenstern <klemens.morgenstern@gmx.net>
Date:   Mon Nov 12 16:56:32 2018 +0700

    attempting new timed wait for OSX

commit 5aa691cc3a
Author: Klemens David Morgenstern <klemens.morgenstern@gmx.net>
Date:   Mon Nov 12 16:32:11 2018 +0700

    adding valgrind to build

commit 04712d57f4
Author: Klemens David Morgenstern <klemens.morgenstern@gmx.net>
Date:   Mon Nov 12 16:09:34 2018 +0700

    changin pipe mode

commit ed4c861e78
Author: Klemens David Morgenstern <klemens.morgenstern@gmx.net>
Date:   Mon Nov 12 15:37:08 2018 +0700

    trying to filter section warnings
2018-11-12 18:39:31 +07:00
Klemens David Morgenstern
78b5ea1f6b checking the sigtimedwait macro --> test should fail on OSX & work on Linux 2018-11-12 14:48:58 +07:00
Klemens David Morgenstern
f3b2c0a67e typo fixes 2018-10-26 11:35:33 +07:00
Klemens David Morgenstern
69c04d5e29 updated doc to say io_context instead of io_service 2018-10-26 10:55:28 +07:00
Klemens David Morgenstern
78f4115a32 Implement move operations for streams, closes #173 2018-10-26 10:53:47 +07:00
Klemens David Morgenstern
b5b91d578d Merge branch 'develop' of github.com:boostorg/process into develop 2018-10-01 10:01:40 +07:00
Jacob Barrett
502169a5ad Changes still_active constant to support Solaris.
The use of the WIFSTOPPED bits did not go far enough on Solaris. It
is expected to also have a non-zero value in the next bytes. This
new value is tested be valid on Linux, MacOS and Solaris.

Fixes #51
2018-09-27 07:36:03 -07:00
Klemens David Morgenstern
42fbbbd8a6 Merge branch 'develop' of github.com:klemens-morgenstern/boost-process into develop 2018-09-27 10:02:01 +07:00
Klemens David Morgenstern
dd0b26de4c closes #180 2018-09-27 10:00:29 +07:00
Klemens Morgenstern
10665bfaff
Merge pull request #181 from krwalker/fix-vc-c4458-warnings
Fix warnings: decl. of 'x' hides class member
2018-09-27 09:55:41 +07:00
K. R. Walker
2576ed166f Fix warnings: decl. of 'x' hides class member
Address C4458 warnings when compiled with Visual C++
2018-09-26 16:54:46 -06:00
Klemens Morgenstern
57e9dfb705
Merge pull request #179 from klemens-morgenstern/develop
Update for master
2018-09-26 13:50:47 +07:00
Klemens David Morgenstern
4fd8887601 fixed group wait-for on windows 2018-09-26 11:50:18 +07:00
Lemmy
3cf4bf6480 Hope fully fixed group waiting 2018-09-25 17:32:32 +02:00
Lemmy
6ba8e88def wait-group fix 2018-09-25 11:45:04 +02:00
Lemmy
0938103427 Reworked wait_for_exit, concerns #99 and #112 2018-09-25 10:45:54 +02:00
Lemmy
e72127f9f8 Implemented proper wait_for for group_handles 2018-09-25 10:27:40 +02:00
Lemmy
eea73753b5 Fixed group wait in linux 2018-09-25 07:40:07 +02:00
Klemens David Morgenstern
4f3b425073 fixed group-wait, finally 2018-09-25 02:37:51 +07:00
Klemens David Morgenstern
dcb8a0266a preserving creation_flags, closes #176 2018-09-24 23:42:53 +07:00
Klemens David Morgenstern
99285a9de6 fixed windows-h variant 2018-09-24 23:27:01 +07:00
Klemens David Morgenstern
6cc31b93d8 readded BOOST_WINAPI_WINAPI_CC 2018-09-24 23:10:33 +07:00
Klemens David Morgenstern
d1ce19d848 fixes #178 2018-09-21 10:48:03 +07:00
Klemens David Morgenstern
8d2bd87707 ALternative (typeless) implementation of #177 2018-08-29 09:37:07 +08:00
Klemens David Morgenstern
44162ecf22 removed errornous noexcept 2018-06-19 18:34:39 +08:00
Klemens David Morgenstern
9549ffe7e1 capture list fix 2018-05-27 11:39:56 +02:00
Klemens David Morgenstern
dd0edb4aee Merge branch 'develop' of github.com:klemens-morgenstern/boost-process into develop 2018-05-26 22:07:15 +02:00
Klemens David Morgenstern
3029f4623a closes #41 2018-05-26 22:06:54 +02:00
Klemens David Morgenstern
74606db379 Merge branch 'bugfixing' into develop 2018-05-26 22:00:12 +02:00
Klemens David Morgenstern
81803868a3 closes #45 2018-05-26 21:59:58 +02:00
Klemens David Morgenstern
eff42f91ef closes #42 2018-05-26 21:57:25 +02:00
Klemens David Morgenstern
a25b6ca35b closes #32 2018-05-26 21:55:07 +02:00
Klemens David Morgenstern
52f030a83c closes #167 2018-05-26 20:32:08 +02:00
Egor Pugin
9cc651bdeb
Add missing returns on windows side. 2018-05-09 20:09:32 +03:00
Tomasz Jonak
41b7e30c18 Add missing return to async_pipe::async_{read,write}_some 2018-05-04 14:03:54 +00:00
Klemens Morgenstern
35fda5aa6a
Update job_workaround.hpp 2018-04-05 20:12:51 +02:00
Klemens Morgenstern
d47b7f7ac4
Update job_workaround.hpp 2018-04-05 10:08:00 +02:00
Klemens David Morgenstern
c5798fdf7f added write_some and read_some overloads - closes #35 2018-03-13 10:11:01 +08:00
Klemens David Morgenstern
5e43e7c07c Merge branch 'develop' of github.com:boostorg/process into develop 2018-03-11 20:58:22 +01:00
Andrey Semashev
900aab5d6d Switched WINAPI calling convention macros to the replacements from Boost.WinAPI
WINAPI macro definition in Boost.WinAPI is deprecated as it may clash with
the macro defined in Windows SDK.
2018-03-11 20:20:49 +03:00
Alex Merry
6625999765 Check the "still running" status code does not clash with WIFSIGNALED
This makes the static_assert reflect the actual assumptions in the code.
2018-02-22 14:31:22 +00:00
Alex Merry
0d3688aca5 Ignore stopped processes
is_running should only concern itself with terminated processes, not
stopped processes (which might be continued later).
2018-02-22 14:12:46 +00:00
Klemens Morgenstern
40be786c43
Merge pull request #150 from amerry/async-exit-status
Return the same exit status in the async handler as the sync method
2018-02-22 13:43:06 +01:00
Klemens Morgenstern
d4a0444223
Merge pull request #147 from amerry/args
Always set arguments on POSIX
2018-02-22 13:05:33 +01:00
Alex Merry
ed32531369 Return the same exit status in the async handler as the sync method
Previously, if the process terminated via a signal on posix, the async
handler would provide an exit status of 0.
2018-02-22 11:53:42 +00:00
Alex Merry
8aaf53d76d Always set arguments on POSIX
Explicitly specifying an executable (either with boost::filesystem::path
or boost::process::exe) and no arguments causes NULL to be passed as the
argument list.

Not only is this unexpected behaviour for the child process (which
doesn't even have argv[0]), it is not portable across UNIX systems. From
the execve(2) man page on Linux:

"On Linux, either argv or envp can be specified as NULL, which has the
same effect as specifying these arguments as a pointer to a list
containing a single NULL pointer.  Do not take advantage of this
misfeature!  It is nonstandard and nonportable:  on  most other UNIX
systems doing this will result in an error (EFAULT)."
2018-02-21 15:43:32 +00:00
Alex Merry
92ee239891 Only reap children we are watching for when handling SIGCHLD
There may be other io_context instances with child instances, and child
instances with no associated io_context. If we pass 0 to ::waitpid(), we
will reap their processes as well, without updating the state of the
corresponding child instance.

Instead, we call `::waitpid` once for each child we are watching for.
This has some amount of overhead (multiple system calls), but ensures
correct behaviour (providing nothing other than an asio::signal_set is
watching for SIGCHLD).
2018-02-20 14:32:33 +00:00
Connor Lane Smith
a610fe74ff
Fix search_path not to return directories on POSIX 2018-02-14 13:56:34 +00:00
Markus Tillinger
a55946eb5d Fix: Inconsistent behaviour in various overloaded functions/methods #139
Removed duplicated code in overloaded functions.
Replaced system_clock with steady_clock.
2018-02-08 21:49:49 +01:00
Klemens David Morgenstern
60302c0017 Merge branch 'develop' of github.com:klemens-morgenstern/boost-process into develop 2018-02-06 20:20:18 +01:00
Klemens David Morgenstern
08eaf8b7a1 added BOOST_NO_ANSI_APIS support, closes #26 2018-02-06 20:20:02 +01:00
Klemens Morgenstern
cc70ec9362
Update pipe_in.hpp 2018-02-06 10:29:16 +01:00
Klemens Morgenstern
b58ecc7c9d
Update async_in.hpp 2018-02-06 10:27:16 +01:00
Klemens Morgenstern
668cbcdaf4
Update windows.hpp 2018-02-06 10:23:02 +01:00
Klemens David Morgenstern
6d7cbd0989 closes #83 2018-02-06 00:32:55 +01:00
Klemens David Morgenstern
0764f788a6 typo fix 2018-02-06 00:24:45 +01:00
Klemens David Morgenstern
2b95dd7011 Merge branch 'develop' of github.com:klemens-morgenstern/boost-process into develop 2018-02-06 00:08:26 +01:00