Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
793ab2b7
Commit
793ab2b7
authored
May 06, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/jonas/src/mysql-4.1
into mysql.com:/home/jonas/src/mysql-5.0
parents
aa9391a0
e9df5390
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
1 deletion
+21
-1
ndb/src/cw/cpcd/APIService.cpp
ndb/src/cw/cpcd/APIService.cpp
+1
-0
ndb/src/cw/cpcd/CPCD.hpp
ndb/src/cw/cpcd/CPCD.hpp
+6
-0
ndb/src/cw/cpcd/Process.cpp
ndb/src/cw/cpcd/Process.cpp
+8
-1
ndb/test/include/CpcClient.hpp
ndb/test/include/CpcClient.hpp
+1
-0
ndb/test/run-test/main.cpp
ndb/test/run-test/main.cpp
+2
-0
ndb/test/src/CpcClient.cpp
ndb/test/src/CpcClient.cpp
+3
-0
No files found.
ndb/src/cw/cpcd/APIService.cpp
View file @
793ab2b7
...
...
@@ -122,6 +122,7 @@ ParserRow<CPCDAPISession> commands[] =
CPCD_ARG
(
"stderr"
,
String
,
Optional
,
"Redirection of stderr"
),
CPCD_ARG
(
"stdin"
,
String
,
Optional
,
"Redirection of stderr"
),
CPCD_ARG
(
"ulimit"
,
String
,
Optional
,
"ulimit"
),
CPCD_ARG
(
"shutdown"
,
String
,
Optional
,
"shutdown options"
),
CPCD_CMD
(
"undefine process"
,
&
CPCDAPISession
::
undefineProcess
,
""
),
CPCD_CMD_ALIAS
(
"undef"
,
"undefine process"
,
0
),
...
...
ndb/src/cw/cpcd/CPCD.hpp
View file @
793ab2b7
...
...
@@ -243,6 +243,12 @@ public:
* @desc Format c:unlimited d:0 ...
*/
BaseString
m_ulimit
;
/**
* @brief shutdown options
*/
BaseString
m_shutdown_options
;
private:
class
CPCD
*
m_cpcd
;
void
do_exec
();
...
...
ndb/src/cw/cpcd/Process.cpp
View file @
793ab2b7
...
...
@@ -44,6 +44,8 @@ CPCD::Process::print(FILE * f){
fprintf
(
f
,
"stdout: %s
\n
"
,
m_stdout
.
c_str
()
?
m_stdout
.
c_str
()
:
""
);
fprintf
(
f
,
"stderr: %s
\n
"
,
m_stderr
.
c_str
()
?
m_stderr
.
c_str
()
:
""
);
fprintf
(
f
,
"ulimit: %s
\n
"
,
m_ulimit
.
c_str
()
?
m_ulimit
.
c_str
()
:
""
);
fprintf
(
f
,
"shutdown: %s
\n
"
,
m_shutdown_options
.
c_str
()
?
m_shutdown_options
.
c_str
()
:
""
);
}
CPCD
::
Process
::
Process
(
const
Properties
&
props
,
class
CPCD
*
cpcd
)
{
...
...
@@ -64,6 +66,7 @@ CPCD::Process::Process(const Properties & props, class CPCD *cpcd) {
props
.
get
(
"stdout"
,
m_stdout
);
props
.
get
(
"stderr"
,
m_stderr
);
props
.
get
(
"ulimit"
,
m_ulimit
);
props
.
get
(
"shutdown"
,
m_shutdown_options
);
m_status
=
STOPPED
;
if
(
strcasecmp
(
m_type
.
c_str
(),
"temporary"
)
==
0
){
...
...
@@ -451,7 +454,11 @@ CPCD::Process::stop() {
m_status
=
STOPPING
;
errno
=
0
;
int
ret
=
kill
(
-
m_pid
,
SIGTERM
);
int
signo
=
SIGTERM
;
if
(
m_shutdown_options
==
"SIGKILL"
)
signo
=
SIGKILL
;
int
ret
=
kill
(
-
m_pid
,
signo
);
switch
(
ret
)
{
case
0
:
logger
.
debug
(
"Sent SIGTERM to pid %d"
,
(
int
)
-
m_pid
);
...
...
ndb/test/include/CpcClient.hpp
View file @
793ab2b7
...
...
@@ -56,6 +56,7 @@ public:
BaseString
m_stdout
;
BaseString
m_stderr
;
BaseString
m_ulimit
;
BaseString
m_shutdown_options
;
};
private:
...
...
ndb/test/run-test/main.cpp
View file @
793ab2b7
...
...
@@ -448,6 +448,7 @@ setup_config(atrt_config& config){
proc
.
m_proc
.
m_runas
=
proc
.
m_host
->
m_user
;
proc
.
m_proc
.
m_ulimit
=
"c:unlimited"
;
proc
.
m_proc
.
m_env
.
assfmt
(
"MYSQL_BASE_DIR=%s"
,
dir
.
c_str
());
proc
.
m_proc
.
m_shutdown_options
=
""
;
proc
.
m_hostname
=
proc
.
m_host
->
m_hostname
;
proc
.
m_ndb_mgm_port
=
g_default_base_port
;
if
(
split1
[
0
]
==
"mgm"
){
...
...
@@ -470,6 +471,7 @@ setup_config(atrt_config& config){
proc
.
m_proc
.
m_path
.
assign
(
dir
).
append
(
"/libexec/mysqld"
);
proc
.
m_proc
.
m_args
=
"--core-file --ndbcluster"
;
proc
.
m_proc
.
m_cwd
.
appfmt
(
"%d.mysqld"
,
index
);
proc
.
m_proc
.
m_shutdown_options
=
"SIGKILL"
;
// not nice
}
else
if
(
split1
[
0
]
==
"api"
){
proc
.
m_type
=
atrt_process
::
NDB_API
;
proc
.
m_proc
.
m_name
.
assfmt
(
"%d-%s"
,
index
,
"ndb_api"
);
...
...
ndb/test/src/CpcClient.cpp
View file @
793ab2b7
...
...
@@ -282,6 +282,7 @@ convert(const Properties & src, SimpleCpcClient::Process & dst){
b
&=
src
.
get
(
"stdout"
,
dst
.
m_stdout
);
b
&=
src
.
get
(
"stderr"
,
dst
.
m_stderr
);
b
&=
src
.
get
(
"ulimit"
,
dst
.
m_ulimit
);
b
&=
src
.
get
(
"shutdown"
,
dst
.
m_shutdown_options
);
return
b
;
}
...
...
@@ -305,6 +306,7 @@ convert(const SimpleCpcClient::Process & src, Properties & dst ){
b
&=
dst
.
put
(
"stdout"
,
src
.
m_stdout
.
c_str
());
b
&=
dst
.
put
(
"stderr"
,
src
.
m_stderr
.
c_str
());
b
&=
dst
.
put
(
"ulimit"
,
src
.
m_ulimit
.
c_str
());
b
&=
dst
.
put
(
"shutdown"
,
src
.
m_shutdown_options
.
c_str
());
return
b
;
}
...
...
@@ -372,6 +374,7 @@ SimpleCpcClient::list_processes(Vector<Process> &procs, Properties& reply) {
CPC_ARG
(
"stdout"
,
String
,
Mandatory
,
"Redirect stdout"
),
CPC_ARG
(
"stderr"
,
String
,
Mandatory
,
"Redirect stderr"
),
CPC_ARG
(
"ulimit"
,
String
,
Mandatory
,
"ulimit"
),
CPC_ARG
(
"shutdown"
,
String
,
Mandatory
,
"shutdown"
),
CPC_END
()
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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