| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
This change adds a Windows implementation for the SubProcess class.
We're also implementing "run_command" for Windows, re-using
the SubProcess class. It might be seen as just a convenience
wrapper on top of that. At the moment, the Linux bits are left
unchanged, although the same implementation might be used for all
platforms.
Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We're going to stub certain modules and functions for Windows builds.
Some of them will be implemented in subsequent commits, some are platform
specific and will be skipped.
Modules:
* module.c
* subprocess.cc
* blkdev.cc
* dns_resolve.cc
* numa.cc
* syslog.h
* statvfs.h
* libblk
* neorados
Functions:
x signal functions
x fork
x chown
* socketpair_cloexec
* dump_open_fds
* run_cmd
* is_symlink
* CInode::d_type
* nbd commands
Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
|
|
|
|
| |
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
|
|
|
|
|
|
| |
cleanup the header dependencies and speed-up the compiling
Signed-off-by: Kefu Chai <kchai@redhat.com>
|
|
|
|
| |
Signed-off-by: Kefu Chai <kchai@redhat.com>
|
|
|
|
|
|
|
|
|
| |
- During include cleanup just a too bit much was removed for FreeBSD
to get things compiled.
This redoes some of the includes.
Tracker: http://tracker.ceph.com/issues/19883
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
|
|
|
|
|
|
| |
Fixes: http://tracker.ceph.com/issues/19883 (Partially)
Signed-off-by: Jos Collin <jcollin@redhat.com>
|
|
|
|
| |
Signed-off-by: liuchang0812 <liuchang0812@gmail.com>
|
|
|
|
| |
Signed-off-by: Sage Weil <sage@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some code like crush/CrushTester.cc, uses err() to get the output status of a
spawned command.
As per reported in bug #15011, some tests were failing because of some utf8
decoding issues. The implied buffers were generated by the output of err()
function of SubProcess.
err() is returning the str().c_str() value of 'errstr' object which is not
living much longer that the function itself.
This patch returns a std::string to avoid the temporary allocation and fixes
the associated err() calls accordingly.
Since this commit, the make check is now passing everytime.
Fixes: #15011
Signed-off-by: Erwan Velu <erwan@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In current implementation, the declare of the
SubProcess class was seperate from the
implementation, like this:
class SubProcess
{
SubProcess();
};
SubProcess::SubProcess()
....
This will cause the 'multiple definition of XXX' bug
when more than one source files linked together if
they are all include SubProcess.h.
So, this patch fix it.
Signed-off-by: Yunchuan Wen <yunchuan.wen@kylin-cloud.com>
|
|
|
|
|
|
|
| |
The class SubProcess will use std::cerr,
but not include the header.
Signed-off-by: Yunchuan Wen <yunchuan.wen@kylin-cloud.com>
|
|
|
|
| |
Signed-off-by: Yunchuan Wen <yunchuan.wen@kylin-cloud.com>
|
|
|
|
| |
Signed-off-by: Rohan Mars <code@rohanmars.com>
|
|\
| |
| |
| |
| |
| | |
common/SubProcess: silence compiler warnings
Reviewed-by: Loic Dachary <ldachary@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* the STD{IN,OUT,ERR}_FILENO are closed when being dup2'ed so we
can not write to cout or cerr in child processes, as these
fstream are still holding the old references.
* to silence every write(2) call is tedious. better off overwriting
the raw buffer in cerr and cout ostreams
Fixes: #12730
Signed-off-by: Kefu Chai <kchai@redhat.com>
|
|/
|
|
|
|
| |
include <signal.h> to avoid errors/warnings on missing functions
Signed-off-by: Dennis Schafroth <dennis@schafroth.com>
|
|
|
|
| |
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
|
|
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
|