Re: Threads

B. James Phillippe (bryan@terran.org)
Mon, 4 Oct 1999 12:47:17 -0700 (PDT)


On Mon, 4 Oct 1999, Stanislav Krasilovskiy wrote:

> Hi,
>
> I have a short question, but I lack the expertise to answer it.
>
> I am creating a thread in a custom system call, through a call to
> kernel_thread(). When this thread finishes, it becomes a zombie and
> persists until the user program which called the system call exits. Is

You want the thread to act like a daemon, then?

Did you do something like this:

tsk->pgrp = 1 ; /* detach from parent */
tsk->session = 1 ; /* now owned by "init" */
tsk->tty = NULL ; /* detach from any tty */

where "tsk" is a pointer to the task_struct representing the thread?

-bp

--
# bryan at terran dot org
# http://www.terran.org/~bryan

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/