X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=kernel%2Ffork.c;h=b25802065031e7612a5733838459d41008bd31f6;hb=6e8dcee3e63f5a2cba4affff4bbb6e228f4b258a;hp=b65187f0c74e720281ff6f08b98e3bef19e638c4;hpb=e0d7ff168a71299919f01500b3d507aae0c67513;p=linux-2.6 diff --git a/kernel/fork.c b/kernel/fork.c index b65187f0c7..b258020650 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -176,6 +176,7 @@ static struct task_struct *dup_task_struct(struct task_struct *orig) /* One for us, one for whoever does the "release_task()" (usually parent) */ atomic_set(&tsk->usage,2); + atomic_set(&tsk->fs_excl, 0); return tsk; } @@ -994,6 +995,9 @@ static task_t *copy_process(unsigned long clone_flags, * of CLONE_PTRACE. */ clear_tsk_thread_flag(p, TIF_SYSCALL_TRACE); +#ifdef TIF_SYSCALL_EMU + clear_tsk_thread_flag(p, TIF_SYSCALL_EMU); +#endif /* Our parent execution domain becomes current domain These must match for thread signalling to apply */ @@ -1112,6 +1116,9 @@ static task_t *copy_process(unsigned long clone_flags, __get_cpu_var(process_counts)++; } + if (!current->signal->tty && p->signal->tty) + p->signal->tty = NULL; + nr_threads++; total_forks++; write_unlock_irq(&tasklist_lock);