Skip to content

Commit f51bd28

Browse files
committed
wl#9819 patch #1 : NDBD angel process reports its process id to kernel process
1 parent c890552 commit f51bd28

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

storage/ndb/src/kernel/angel.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,9 @@ angel_run(const char* progname,
668668
one_arg.assfmt("--nostart=%d", no_start);
669669
args.push_back(one_arg);
670670

671+
one_arg.assfmt("--angel-pid=%d", getpid());
672+
args.push_back(one_arg);
673+
671674
pid_t child = retry_spawn_process(progname, args);
672675
if (child <= 0)
673676
{

storage/ndb/src/kernel/main.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
2+
Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License as published by
@@ -39,6 +39,7 @@ static int opt_report_fd;
3939
static int opt_initial;
4040
static int opt_no_start;
4141
static unsigned opt_allocated_nodeid;
42+
static int opt_angel_pid;
4243
static int opt_retries;
4344
static int opt_delay;
4445

@@ -93,6 +94,10 @@ static struct my_option my_long_options[] =
9394
"INTERNAL: nodeid allocated by angel process",
9495
(uchar**) &opt_allocated_nodeid, (uchar**) &opt_allocated_nodeid, 0,
9596
GET_UINT, REQUIRED_ARG, 0, 0, UINT_MAX, 0, 0, 0 },
97+
{ "angel-pid", NDB_OPT_NOSHORT,
98+
"INTERNAL: angel process id",
99+
(uchar**) &opt_angel_pid, (uchar **) &opt_angel_pid, 0,
100+
GET_UINT, REQUIRED_ARG, 0, 0, UINT_MAX, 0, 0, 0 },
96101
{ "connect-retries", 'r',
97102
"Number of times mgmd is contacted at start. -1: eternal retries",
98103
(uchar**) &opt_retries, (uchar**) &opt_retries, 0,

0 commit comments

Comments
 (0)