Skip to content
Snippets Groups Projects
Commit 65591945 authored by David Vasek's avatar David Vasek Committed by Daniel Salzman
Browse files

xdp-gun: change internal exit statuses of child process, add comments

parent 71d20c91
No related branches found
No related tags found
1 merge request!1149Xdp gun popen fix
......@@ -67,7 +67,7 @@ dup_stdout:
perror("dup_stdout");
close(pipefds[0]);
close(pipefds[1]);
exit(98);
exit(EXIT_FAILURE);
}
close(pipefds[1]);
......@@ -77,7 +77,7 @@ dup_stdout:
execve(binfile, args, env);
perror("execve");
exit(99);
exit(EXIT_FAILURE);
}
close(pipefds[1]);
......
......@@ -25,6 +25,10 @@
* This function is a safer altervative to popen(), it is the same to
* popen() as execve() is to system().
*
* Warning: this function is designed to be as simple as possible,
* for reliable operation proper checking for transient
* error is needed.
*
* \param binfile Executable file to be executed.
* \param args NULL-terminated arguments; first shall be the prog name!
* \param env NULL-terminated environment variables "key=value"
......@@ -38,6 +42,8 @@ int kpopenvef(const char *binfile, char *const args[], char *const env[], bool d
/*!
* \brief Variant of kpopenvef() returning FILE*
*
* Warning: the same warning as for kpopenvef() applies here too.
*
* \param binfile Executable file to be executed.
* \param args NULL-terminated arguments; first shall be the prog name!
* \param env NULL-terminated environment variables "key=value"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment