[Xapian-tickets] [Xapian] #502: Use custom locking helper executable

Xapian nobody at xapian.org
Thu Dec 4 03:57:24 GMT 2014


#502: Use custom locking helper executable
---------------------------+-----------------------------
 Reporter:  olly           |             Owner:  olly
     Type:  enhancement    |            Status:  assigned
 Priority:  normal         |         Milestone:  1.3.3
Component:  Backend-Chert  |           Version:  1.2.2
 Severity:  normal         |        Resolution:
 Keywords:                 |        Blocked By:
 Blocking:                 |  Operating System:  All
---------------------------+-----------------------------
Changes (by olly):

 * status:  new => assigned


Comment:

 On Linux we no longer need to fork() a child process, thanks to the "OFD"
 locks.  These have been submitted to POSIX, and they clearly fix a mistake
 in the specification of fcntl() locking, so I'm hopefully they'll get
 implemented promptly.

 There are a few obstacles to using {{{vfork()}}} - we call {{{dup2()}}}
 currently to connect stdin and stdout of the child process to the pipe
 created by {{{socketpair()}}} but we could instead pass the number of the
 fd on the command line of the helper, and just use that number.  We would
 have to postpone getting the lock until after we have done the exec
 though, since we have to close any other open fds before we try to get the
 lock (or else closing them might smash the lock).

--
Ticket URL: <http://trac.xapian.org/ticket/502#comment:7>
Xapian <http://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list