[PATCH] getpid/vfork/raise fix
Andreas Schwab
schwab@suse.de
Wed Mar 10 15:06:00 GMT 2004
Jakub Jelinek <jakub@redhat.com> writes:
> On Wed, Mar 10, 2004 at 03:33:05PM +0100, Andreas Schwab wrote:
>> That doesn't seem to work, though. I'm getting p3 != p4 in the posix
>> vfork tests. Or do you see any error in my implementation?
>
> Yes.
>
>> ENTRY(__vfork)
>> alloc r2=ar.pfs,0,0,2,0
>> adds r14=PID,r13
>> ;;
>> ld4 r16=[r14]
>> ;;
>> sub r15=0,r16
>> cmp.eq p0,p6=0,r16
>
> This line should read
> cmp.eq p6,p0=0,r16
> instead.
> You want to set ->pid to 0x80000000 if ->pid has been previously 0, not
> non-zero.
You're right, of course. Strange it didn't fail with my old version.
> With this change both tst-vfork1.c and tst-vfork2.c pass for me
/me too.
Thanks, Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, MaxfeldstraÃe 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
More information about the Libc-hacker
mailing list