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

Re: where to setup pd->cancelbuf for a fork() process? thanks.



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hu, Boris wrote:
> In tst-join1.c,  the do_test() is created by fork(), while it is
> pthread_joined 
> by a child thread later.  In pthread_join(), it will call
> __longjmp(pd->cancelbuf).
> My problem is where to set the process of do_test()'s pd->cancelbuf for it
> is 
> created by fork() instead of pthread_create(). 

Read again what fork() does.   It is not changing anything about the
calling thread.  I.e., the setjmp() the thread calling fork() executed
at the beginning is still valid and will be used.

- -- 
- --------------.                        ,-.            444 Castro Street
Ulrich Drepper \    ,-----------------'   \ Mountain View, CA 94041 USA
Red Hat         `--' drepper at redhat.com `---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+ZPJ32ijCOnn/RHQRAjz/AJ9F7a7tviGfM0I/e6VC7Zw4i2lrigCeImg4
loZq3XDetslJjQiA4ds8hdE=
=JrSl
-----END PGP SIGNATURE-----





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