Re: Question about execve.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > A small note about getpid():
> > 
> > Since the parent and child share the same memory space, the parent
> > temporarily negates the cached PID value just before the vfork. Only
> > the parent, after the vfork, restores the cached PID. This is on
> > purpose to prevent any functions like PID-related functions from
> > working in the child() during the window bewteen vfork and execve.
> 
> Ok, it might be glibc that's broken (i.e., it doesn't restore correct
> dave).

The bad value is stored here:

0x0003f578 <fork+700>:	ldil L%7b800,r26
0x0003f57c <fork+704>:	b,l 0x35d74 <_IO_list_unlock>,rp
0x0003f580 <fork+708>:	stw r19,-414(r6)
(gdb) p/x $r19
$2 = 0x10101364

Dave
-- 
J. David Anglin                                  dave.anglin@xxxxxxxxxxxxxx
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux