Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Oct 2004 21:20:18 GMT
From:      Mark Gooderum <mark@verniernetworks.com>
To:        freebsd-threads@FreeBSD.org
Subject:   Re: threads/72429: threads blocked in stdio (fgets, etc) are not cancellable in 5.3 (works in 4.x)
Message-ID:  <200410072120.i97LKIFT090833@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR threads/72429; it has been noted by GNATS.

From: Mark Gooderum <mark@verniernetworks.com>
To: Daniel Eischen <deischen@gdeb.com>
Cc: freebsd-gnats-submit@freebsd.org, freebsd-threads@freebsd.org,
	archie@dellroad.org
Subject: Re: threads/72429: threads blocked in stdio (fgets, etc) are not
 cancellable in 5.3 (works in 4.x)
Date: Thu, 07 Oct 2004 16:14:42 -0500

 But this is a major change in behavior from FreeBSD 4 and also a 
 difference from Linux.  I'm not a Linux bigot at all but there is a 
 recurring theme that XX threaded apps works on Linux but is unstable on 
 FreeBSD and these sort of major behavior deltas contribute to the 
 perception of FreeBSD threading as unstable by some.
 
 In fact it means that any thread doing blocking stdio is uncancellable - 
 the standard may not require it but many applications might expect it.  
 Given that the functionality was there in 4.x and lost in 5.x I'd call 
 it a regression. 
 
 I've no goal of being a "johnny come lately" and criticize choices made 
 earlier but I am part of a company using FreeBSD as part of it's core 
 technology and we're in the midst of migrating our product code base 
 from FreeBSD 4.9 (most recent, been trucking along since 4.3) to FreeBSD 
 5.3 and these are the sort of changes that break things and cause pain 
 for developers.  Parts of our code have been threaded from the start - 
 originally with PTH and then we made the transition to libc_r pthreads 
 about a year ago and now we're jumping to libpthread to stick with what 
 is "supported".
 
 Just my polite $.02 worth.
 -=-
 Mark
 
 >fgets is not a required cancellation point.  See the POSIX standard.
 >The standard says it, along with many other functions, _may_ be a
 >cancellation point, but the only required cancellation points are:
 >
 >  accept()           mq_timedsend()           putpmsg()       sigtimedwait()
 >  aio_suspend()      msgrcv()                 pwrite()        sigwait()
 >  clock_nanosleep()  msgsnd()                 read()          sigwaitinfo()
 >  close()            msync()                  readv()         sleep()
 >  connect()          nanosleep()              recv()          system()
 >  creat()            open()                   recvfrom()      tcdrain()
 >  fcntl()2           pause()                  recvmsg()       usleep()
 >  fdatasync()        poll()                   select()        wait()
 >  fsync()            pread()                  sem_timedwait() waitid()
 >  getmsg()           pselect()                sem_wait()      waitpid()
 >  getpmsg()          pthread_cond_timedwait() send()          write()
 >  lockf()            pthread_cond_wait()      sendmsg()       writev()
 >  mq_receive()       pthread_join()           sendto()
 >  mq_send()          pthread_testcancel()     sigpause()
 >  mq_timedreceive()  putmsg()                 sigsuspend()
 >
 >  
 >
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200410072120.i97LKIFT090833>