diff options
author | netchild <netchild@FreeBSD.org> | 2010-11-22 09:06:59 +0000 |
---|---|---|
committer | netchild <netchild@FreeBSD.org> | 2010-11-22 09:06:59 +0000 |
commit | 46e50a7603917cf17df6f85004e94e846f192e37 (patch) | |
tree | 0c5325cf1dc8ea3c0510b059ec27414f9482c17f /sys/compat/linux/linux_emul.h | |
parent | 775302a94a5ee0466093ff453c02ba80b5827cf3 (diff) | |
download | FreeBSD-src-46e50a7603917cf17df6f85004e94e846f192e37.zip FreeBSD-src-46e50a7603917cf17df6f85004e94e846f192e37.tar.gz |
By using the 32-bit Linux version of Sun's Java Development Kit 1.6
on FreeBSD (amd64), invocations of "javac" (or "java") eventually
end with the output of "Killed" and exit code 137.
This is caused by:
1. After calling exec() in multithreaded linux program threads are not
destroyed and continue running. They get killed after program being
executed finishes.
2. linux_exit_group doesn't return correct exit code when called not
from group leader. Which happens regularly using sun jvm.
The submitters fix this in a similar way to how NetBSD handles this.
I took the PRs away from dchagin, who seems to be out of touch of
this since a while (no response from him).
The patches committed here are from [2], with some little modifications
from me to the style.
PR: 141439 [1], 144194 [2]
Submitted by: Stefan Schmidt <stefan.schmidt@stadtbuch.de>, gk
Reviewed by: rdivacky (in april 2010)
MFC after: 5 days
Diffstat (limited to 'sys/compat/linux/linux_emul.h')
-rw-r--r-- | sys/compat/linux/linux_emul.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/compat/linux/linux_emul.h b/sys/compat/linux/linux_emul.h index 8ce27d7..43034ff 100644 --- a/sys/compat/linux/linux_emul.h +++ b/sys/compat/linux/linux_emul.h @@ -31,8 +31,12 @@ #ifndef _LINUX_EMUL_H_ #define _LINUX_EMUL_H_ +#define EMUL_SHARED_HASXSTAT 0x01 + struct linux_emuldata_shared { int refs; + int flags; + int xstat; pid_t group_pid; LIST_HEAD(, linux_emuldata) threads; /* head of list of linux threads */ @@ -76,6 +80,7 @@ int linux_proc_init(struct thread *, pid_t, int); void linux_proc_exit(void *, struct proc *); void linux_schedtail(void *, struct proc *); void linux_proc_exec(void *, struct proc *, struct image_params *); +void linux_kill_threads(struct thread *, int); extern struct sx emul_shared_lock; extern struct mtx emul_lock; |