1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/daemons/dmeventd
Mikulas Patocka 3395d72881 Change exit() to _exit() in the child process. exit flushes stdio file buffers,
_exit doesn't. If there were some open files, an error in exec and subsequent
exit() would cause the buffers to be flushed twice.

Example:

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/wait.h>

int main()
{
	printf("buu");
	if (!fork()) {
		execl("/bin/true-not-exists", "/bin/true", NULL);
		exit(1);
	}
	wait(NULL);
	return 0;
}

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com

---
 daemons/dmeventd/libdevmapper-event.c |    2 +-
 lib/misc/lvm-exec.c                   |    2 +-
 test/harness.c                        |    3 ++-
 tools/dmsetup.c                       |    2 +-
 4 files changed, 5 insertions(+), 4 deletions(-)
2009-07-13 21:26:41 +00:00
..
plugins pre-release tidy up 2009-06-30 18:39:31 +00:00
.exported_symbols Add dm_event_handler_[gs]et_timeout functions. 2007-01-22 15:03:57 +00:00
dmeventd.c more fixes 2008-11-04 15:07:45 +00:00
dmeventd.h Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1. 2007-08-21 16:26:07 +00:00
libdevmapper-event.c Change exit() to _exit() in the child process. exit flushes stdio file buffers, 2009-07-13 21:26:41 +00:00
libdevmapper-event.h Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1. 2007-08-21 16:26:07 +00:00
libdevmapper-event.pc.in configure/makefile tidying + pkg-config support. 2006-04-19 15:23:10 +00:00
Makefile.in Do not use generic install if running install_device-mapper. 2009-05-11 10:12:35 +00:00