qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Has the 'clone' bug been fixed?


From: Jin Guojie
Subject: [Qemu-devel] Has the 'clone' bug been fixed?
Date: Sat, 20 Nov 2010 11:03:41 +0800

I just downloaded qemu-0.12.5, compiled as i386-linux-user, and tried
to run a simple "fork" test.
Qemu failed to emulate fork(), only left an "Invalid argument" message.
I checked linux-user/system.c, and noticed the "~(CSIGNAL |
CLONE_NPTL_FLAGS2))" flags.
But, since I'm not very professional in kernel development, I have no
idea about how to rectify it.
I also searched the mailing list and found similar problems, but no
one prompts a reasonable solution.

The following info may be helpful.

============ fork.c =============
#include <stdio.h>

main()
{
        int pid;

        if ((pid = fork()) > 0) /* parent */
        {
                printf("parent\n");
                wait();
                printf("parent done\n");
        }
        else if (pid == 0)              /* child */
        {
                printf("child: %d\n", getpid());
                sleep(1);
                exit(0);
        }
        else
        {
                perror("fork");
        }

}

# gcc for.c -o fork
#./i386-linux-user/qemu-i386  ./a.out
fork: Invalid argument

jgj:~/qemu-0.12.5$ uname -a
Linux server 2.6.30-2-686 #1 SMP Fri Dec 4 00:53:20 UTC 2009 i686 GNU/Linux
jgj:~/qemu-0.12.5$ gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian
4.4.5-4' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.4 --enable-shared --enable-multiarch
--enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib
--enable-nls --enable-clocale=gnu --enable-libstdcxx-debug
--enable-objc-gc --enable-targets=all --with-arch-32=i586
--with-tune=generic --enable-checking=release --build=i486-linux-gnu
--host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.4.5 (Debian 4.4.5-4)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]