"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "stress-dup.c" between
stress-ng-0.12.09.tar.xz and stress-ng-0.12.10.tar.xz

About: stress-ng will stress test a computer system in various selectable ways. It was designed to exercise various physical subsystems of a computer as well as the various operating system kernel interfaces.

stress-dup.c  (stress-ng-0.12.09.tar.xz):stress-dup.c  (stress-ng-0.12.10.tar.xz)
skipping to change at line 162 skipping to change at line 162
/* /*
* Unlikely to be open, but close it to be a good citizen * Unlikely to be open, but close it to be a good citizen
*/ */
if (info->fd_pipe >= 0) if (info->fd_pipe >= 0)
(void)close(info->fd_pipe); (void)close(info->fd_pipe);
/* /*
* Should always be true.. * Should always be true..
*/ */
if (info->pid_clone >= 0) { if (info->pid_clone >= 0) {
int status; int status, ret;
kill(info->pid_clone, SIGKILL); kill(info->pid_clone, SIGKILL);
waitpid(info->pid_clone, &status, (int)__WCLONE); ret = waitpid(info->pid_clone, &status, (int)__WCLONE);
(void)ret;
} }
(void)close(info->fd); (void)close(info->fd);
return 0; return 0;
} }
/* /*
* Run the dup2 parent/clone in a new process context * Run the dup2 parent/clone in a new process context
* to avoid any potential breaking of the parent fd * to avoid any potential breaking of the parent fd
 End of changes. 2 change blocks. 
2 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)