https://bugzilla.novell.com/show_bug.cgi?id=439786
User tiwai@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=439786#c6
--- Comment #6 from Takashi Iwai 2008-10-29 10:44:33 MDT ---
Oops, sorry, the above analysis was utterly incorrect.
The problem seems to be the wait() call. Look at the strace log above, in the
middle:
6153 clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD
, child_tidptr=0xb6f677b8) = 6199
6153 wait4(-1, NULL, 0, NULL) = 6195
6153 lstat64("/var/tmp/TmpFile.cltMcp",
6199 execve("/usr/sbin/sh", ["sh", "-c", "more /var/tmp/TmpFile.cltMcp"], [/*
2
0 vars */]
6153 <... lstat64 resumed> {st_mode=S_IFREG|0600, st_size=31126, ...}) = 0
6199 <... execve resumed> ) = -1 ENOENT (No such file or directory)
6153 unlink("/var/tmp/TmpFile.cltMcp"
6199 execve("/bin/sh", ["sh", "-c", "more /var/tmp/TmpFile.cltMcp"], [/* 20
var
s */]
6153 <... unlink resumed> ) = 0
So, wait() returns immediately even though a child for "more" is still running.
It could be because you already forked and wait() caught that child.
A solution would be to use waitpid() instead of wait(). A patch is attached
below.
Unfortunately, I cannot test it now because of updates of boost package that
broke everything.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.