[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Fix vfork() syscall emulation
From: |
Kirill A. Shutemov |
Subject: |
Re: [Qemu-devel] [PATCH] Fix vfork() syscall emulation |
Date: |
Sat, 20 Sep 2008 09:45:57 +0300 |
User-agent: |
Mutt/1.5.18 (2008-05-29) |
On Sat, Sep 20, 2008 at 04:56:45AM +0200, andrzej zaborowski wrote:
> 2008/9/18 Kirill A. Shutemov <address@hidden>:
> > vfork() is a kind of fork, not thread despite CLONE_VM
>
> According to clone(2) it can be either, the only difference is that
> vfork() suspends the parent process. So if CLONE_VM is set, I think
> still the pthread / clone way should be used and the child thread
> should be waited on.
vfork() suspends the parent process until a call of execve(2) or _exit(2).
If child call execnv(2) it replaces whole process, not only the thread.
If child call _exit(2) it stops while process, not only the thread.
> On the other hand the patch makes fork() and vfork() be treated identically?
$ cat usr/klibc/vfork.c
/*
* vfork.c
*
* Emulate vfork() with fork() if necessary
*/
#include <unistd.h>
#include <klibc/compiler.h>
#include <klibc/sysconfig.h>
#if !_KLIBC_NO_MMU && !_KLIBC_REAL_VFORK
int vfork(void)
{
return fork();
}
#endif
--
Regards, Kirill A. Shutemov
+ Belarus, Minsk
+ ALT Linux Team, http://www.altlinux.com/
signature.asc
Description: Digital signature
- [Qemu-devel] [PATCH] Implement futimesat() syscall, (continued)
- Re: [Qemu-devel] [PATCH] Implement futimesat() syscall, Riku Voipio, 2008/09/19
- Re: [Qemu-devel] [PATCH] Implement fstatat64() syscall, Riku Voipio, 2008/09/19
- Re: [Qemu-devel] [PATCH] Implement fstatat64() syscall, Kirill A. Shutemov, 2008/09/19
- Re: [Qemu-devel] [PATCH] Swap only altered elements of the grouplist, Riku Voipio, 2008/09/19
- Re: [Qemu-devel] [PATCH] Fix getgroups() syscall emulation, Riku Voipio, 2008/09/19
Re: [Qemu-devel] [PATCH] Fix vfork() syscall emulation, andrzej zaborowski, 2008/09/19
- Re: [Qemu-devel] [PATCH] Fix vfork() syscall emulation,
Kirill A. Shutemov <=
- Re: [Qemu-devel] [PATCH] Fix vfork() syscall emulation, andrzej zaborowski, 2008/09/20
- Re: [Qemu-devel] [PATCH] Fix vfork() syscall emulation, Kirill A. Shutemov, 2008/09/20
- Re: [Qemu-devel] [PATCH] Fix vfork() syscall emulation, andrzej zaborowski, 2008/09/20
- Re: [Qemu-devel] [PATCH] Fix vfork() syscall emulation, Kirill A. Shutemov, 2008/09/20
- Re: [Qemu-devel] [PATCH] Fix vfork() syscall emulation, andrzej zaborowski, 2008/09/20
- Re: [Qemu-devel] [PATCH] Fix vfork() syscall emulation, Kirill A. Shutemov, 2008/09/20
Re: [Qemu-devel] [PATCH] Fix vfork() syscall emulation, Kirill A. Shutemov, 2008/09/20