Re: copy_process() help

From: Dan Smith (dsmith_at_NOSPAM-danplanet.com)
Date: 02/26/04

  • Next message: Dan Smith: "Re: copy_process() help"
    Date: Wed, 25 Feb 2004 18:14:40 -0500
    
    

    > Assuming you mean on i386:

    Yes, sorry. Classic mistake ;)

    > ((struct pt_regs *)(current->thread.esp0))-1

    This is exactly what I needed, thanks. However, it appears to not have
    solved all of my problems.

    After I make this call:

    | shadow_task = copy_process(CLONE_FS | CLONE_FILES | CLONE_PARENT,
    | current_task->thread.esp, tmp,
    | 0, NULL, NULL);
                    
         (tmp is my new struct pt_regs*)
            
    And then this:

    | wake_up_forked_process(shadow_task);

    I see that the new process (shadow_task) gets scheduled once (I put some
    printk's in the scheduler), but never again. It dies quietly, and
    disappears from the process list. In addition, after the syscall, each
    process should make a call to printf() with their PID, but only the
    original process actually does it.

    Can you see anything else that I'm doing wrong? Any help would be
    appreciated.

    --Dan


  • Next message: Dan Smith: "Re: copy_process() help"

    Relevant Pages

    • Re: threads and processes
      ... Kasper Dupont wrote: ... > the shorter a slice the thread gets. ... So can i say that OS scheduler uses both RR + priority based ... >> Also does each thread of a process has a its PID? ...
      (comp.os.linux.development.apps)
    • Re: scale sysctl_sched_shares_ratelimit with nr_cpus
      ... something like this to trace the scheduler: ... Above waker pid is 13871 while the current pid is 13665. ... I analyzed schedstat data and found wake_affine and ...
      (Linux-Kernel)