don't set CLONE_PTRACE -- it confuses strace

R=r
DELTA=4  (3 added, 1 deleted, 0 changed)
OCL=28063
CL=28065
This commit is contained in:
Russ Cox 2009-04-29 18:54:44 -07:00
parent d2e42f3e48
commit 89f8238a99

View File

@ -237,12 +237,14 @@ newosproc(M *m, G *g, void *stk, void (*fn)(void))
int64 ret; int64 ret;
int32 flags; int32 flags;
/*
* note: strace gets confused if we use CLONE_PTRACE here.
*/
flags = CLONE_PARENT /* getppid doesn't change in child */ flags = CLONE_PARENT /* getppid doesn't change in child */
| CLONE_VM /* share memory */ | CLONE_VM /* share memory */
| CLONE_FS /* share cwd, etc */ | CLONE_FS /* share cwd, etc */
| CLONE_FILES /* share fd table */ | CLONE_FILES /* share fd table */
| CLONE_SIGHAND /* share sig handler table */ | CLONE_SIGHAND /* share sig handler table */
| CLONE_PTRACE /* revisit - okay for now */
| CLONE_THREAD /* revisit - okay for now */ | CLONE_THREAD /* revisit - okay for now */
; ;