mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
lvmpolld: label known return codes
so that lvmpolld-client can decode and describe these return codes properly
This commit is contained in:
parent
8d594c409c
commit
333fdfd4b6
@ -397,11 +397,11 @@ static void *fork_and_poll(void *args)
|
||||
|
||||
if ((dup2(outfd, STDOUT_FILENO ) != STDOUT_FILENO) ||
|
||||
(dup2(errfd, STDERR_FILENO ) != STDERR_FILENO))
|
||||
_exit(100);
|
||||
_exit(LVMPD_RET_DUP_FAILED);
|
||||
|
||||
execve(*(pdlv->cmdargv), (char *const *)pdlv->cmdargv, (char *const *)pdlv->cmdenvp);
|
||||
|
||||
_exit(101);
|
||||
_exit(LVMPD_RET_EXC_FAILED);
|
||||
} else {
|
||||
/* parent */
|
||||
if (r == -1) {
|
||||
|
@ -46,4 +46,7 @@
|
||||
#define LVMPD_REAS_RETCODE "retcode" /* lvm cmd ret code */
|
||||
#define LVMPD_REAS_SIGNAL "signal" /* lvm cmd terminating singal */
|
||||
|
||||
#define LVMPD_RET_DUP_FAILED 100
|
||||
#define LVMPD_RET_EXC_FAILED 101
|
||||
|
||||
#endif /* _LVM_LVMPOLLD_PROTOCOL_H */
|
||||
|
Loading…
Reference in New Issue
Block a user