setitimer() and fork()

Kurt Roeckx (Q@ping.be)
Sun, 28 Jan 2001 15:46:38 +0100


I'm having a problem when I try to profile a program that
fork()'s. The problem is that it does count how many times I'm in
a function, but nothing seems to use any cpu time at all.

If I call setitmer(ITIMER_PROF, ...) again after the
fork, it works as expected. fork() doesn't seem to copy the
timer(s). On other OS's, I don't seem to have to do this.

I'm having this problem with both 2.2, and 2.4. I think it used
to work in older versions.

Is this a bug, or is this intentional?

Kurt

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