From: ahoward Date: 2003-01-27T02:13:59+09:00 Subject: Re: solaris porting problem -- flock failure? On Sun, 26 Jan 2003, Joel VanderWerf wrote: > I'm having trouble porting some multi-thread, multi-process code from > linux to solaris. I've already dealt with (or tried to deal with) some > differences in flock (solaris flock is based on fcntl locks), like the > fact that closing a file releases locks on the file held by other threads. you may want to try something like f.sync = true because neither fflush nor close are required to flush data to disk - only to kernel space so perhaps the solaris os is buffing too well and you need to force the data to disk before the next read. also, and i may be wrong on this, it looks like the implementation of rb_file_flock should not cause the thread to block, but should send it into a busy wait - are you sure that failing to aquire the lock blocked _all_ threads? -a ps. i have to agree with guy that this program is a _long_ way from being fairly simply -- ==================================== | Ara Howard | NOAA Forecast Systems Laboratory | Information and Technology Services | Data Systems Group | R/FST 325 Broadway | Boulder, CO 80305-3328 | Email: ahoward@fsl.noaa.gov | Phone: 303-497-7238 | Fax: 303-497-7259 ====================================