This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: new syscall stub support for ia64 libc


>>>>> On Mon, 17 Nov 2003 18:08:03 -0800, Ulrich Drepper <drepper@redhat.com> said:

  Uli> David Mosberger wrote:

  >> The one I mentioned: signal handler gets called in this code
  >> right before the _IO_flockfile():

  >> _IO_FILE *_IO_acquire_lock_file \ __attribute__((cleanup
  >> (_IO_acquire_lock_fct))) \ = (_fp); \ _IO_flockfile
  >> (_IO_acquire_lock_file);

  >> and then the signal handler calls write(), which ends up getting
  >> cancelled.  What prevents this from happening?

  Uli> Why should it be prevented?  If you call write in a signal
  Uli> handler you either disable cancellation of live with it.

Hans Boehm pointed out that pthread_setcancelstate() isn't
asynch-signal-safe, so cancellation would have to be turned off for
the entire app, not just while a signal-handler is running.

	--david


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]