This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch: FYI: PR 7570 and PR 7578


Here are some links that describe fork and vfork:

http://www.opengroup.org/onlinepubs/007904975/functions/vfork.html
http://www.opengroup.org/onlinepubs/007904975/functions/fork.html

In fact they say vfork should not be used anymore and that any other
functions beside the exec family, or to _exit(), is not advised.

I think it only applies to multi-threaded programs
but since libjava cannot assume the program is single
threaded, it should only do what is recomened for
multi-threaded programs. Right?

This is from the opengroup who does certification in UNIX.

Thanks,
Andrew Pinski

PS the second patch is in GNATS.


On Wednesday, August 14, 2002, at 01:41 , Tom Tromey wrote:

"Andrew" == Andrew Pinski <pinskia@physics.uc.edu> writes:
Andrew> There was a second patch which fix the problem that allocate the c
Andrew> string
Andrew> for the directory before forking could you try that one may be use that
Andrew> one instead of the one you applied. I think this is a problem because
Andrew> (according to posix)
Andrew> Consequently, to avoid errors, the child process may only execute
Andrew> async-signal-safe operations until such time as one of the exec
Andrew> functions is called, I think memory allocating is not
Andrew> async-signal-safe.

Part of your message is missing. Is this a limitation only on
threaded programs? Does it really refer to fork() and not vfork()? I
find that surprising, but then I don't really keep up with POSIX :-(.
Could you explain the problem in more depth for me?

Tom








Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]