Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Cameo
cameo
Commits
20359ef4
Commit
20359ef4
authored
Jun 07, 2018
by
legoc
Browse files
Passing pid get with the getpid function on unix's
parent
e6377608
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/cameo/impl/ServicesImpl.cpp
View file @
20359ef4
...
...
@@ -21,6 +21,15 @@
#include
"../SocketException.h"
#include
"../ConnectionTimeout.h"
#ifdef WIN32
#define GET_PROCESS_PID() 0
#else
#include
<unistd.h>
#define GET_PROCESS_PID() ::getpid()
#endif
using
namespace
std
;
namespace
cameo
{
...
...
@@ -311,8 +320,13 @@ std::string ServicesImpl::createRemovePortRequest(int id, const std::string& nam
}
std
::
string
ServicesImpl
::
createStartedUnmanagedRequest
(
const
std
::
string
&
name
)
const
{
// Get the pid.
long
pid
=
GET_PROCESS_PID
();
proto
::
StartedUnmanagedCommand
command
;
command
.
set_name
(
name
);
command
.
set_pid
(
pid
);
std
::
string
result
;
command
.
SerializeToString
(
&
result
);
...
...
src/proto/Messages.proto
View file @
20359ef4
...
...
@@ -219,6 +219,7 @@ message Request {
message
StartedUnmanagedCommand
{
required
string
name
=
1
;
optional
int32
pid
=
2
;
}
message
TerminatedUnmanagedCommand
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment