Hi!

After the recent changes in hppa architecture Erlang virtual machine
fails to start (which leads to several FTBFS bugs in particular:
#559628, #559962, #559004).

The problem is that after vfork(), execve() fails to start a child
process. It sets errno to EMFILE. If I run erl under strace, it works
fine. Is it a bug in glibc, or in Erlang itself?

I'm giving a small excerpt from erts/emulator/sys/unix/sys.c file
where the failed execve(), the rest could be found in erlang
12.b.2.1-1 sources.

        pid = vfork();

        if (pid == 0) {
            /* The child! */

            /* Observe!
             * OTP-4389: The child setup program (implemented in
             * erl_child_setup.c) will perform the necessary setup of the
             * child before it execs to the user program. This because
             * vfork() only allow an *immediate* execve() or _exit() in the
             * child.
             */
            execve(child_setup_prog, cs_argv, new_environ);
            _exit(1);
        }

Cheers!
-- 
Sergei Golovan


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to