Changeset - b20582ad364c
[Not reviewed]
Merge
0 3 0
HanzZ - 13 years ago 2012-10-30 18:06:41
hanzz.k@gmail.com
Merge branch 'master' of github.com:hanzz/libtransport
1 file changed with 5 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/networkpluginserver.cpp
Show inline comments
 
@@ -185,6 +185,11 @@ static unsigned long exec_(const std::string& exePath, const char *host, const c
 
	pid_t pid = fork();
 
	if ( pid == 0 ) {
 
		setsid();
 
		// close all files
 
		int maxfd=sysconf(_SC_OPEN_MAX);
 
		for(int fd=3; fd<maxfd; fd++) {
 
			close(fd);
 
		}
 
		// child process
 
		errno = 0;
 
		int ret = execv(argv[0], argv);
0 comments (0 inline, 0 general)