lsmd: optimization when execute lsmd help generate a process #399
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Execute lsmd --help every time, The command will generate a process.
As a help I think that should not produce a process.
[root@localhost ~]# lsmd --help
] [-v] [-d]libStorageMgmt plug-in daemon.
lsmd [--plugindir ] [--socketdir
--plugindir = The directory where the plugins are located
--socketdir = The directory where the Unix domain sockets will be created
--confdir = The directory where the config files are located
-v = Verbose logging
-d = New style daemon (systemd)
[root@localhost ~]# ps -ef | grep lsmd
libstor+ 3854 1 0 Oct21 ? 00:00:02 /usr/bin/lsmd -d
libstor+ 6112 1 0 21:18 ? 00:00:00 lsmd --help
libstor+ 6305 1 0 21:18 ? 00:00:00 lsmd --help
libstor+ 6340 1 0 21:18 ? 00:00:00 lsmd --help
libstor+ 6373 1 0 21:18 ? 00:00:00 lsmd --help
Optimization is modified as follows:
Return EXIT_SUCCESS when executing lsmd --help
Signed-off-by: Bo wu wubo40@huawei.com
Reviewed-by: Zhiqiang Liu liuzhiqiang26@huawei.com