On 12/9/11 10:12 AM, Jean-Jacques Brucker wrote:
> Playing with flock to securely access to a file shared by multiple
> process. I noticed there are no documented way to do an lseek on an
> opened fd with bash :
        [...]
> I have solve my problem by making this small binary (i just needed a rewind) :
> 
> int main(int argc,char * argv[]) { return lseek(atoi(argv[1]),0L,0); }
> 
> But i ll be glad to use a standard and finished tool.
> 
> Of course we could make an "lseek" binary with some options to cover
> all use cases of lseek function. But I prefer to have such
> functionality inside bash.
ksh93 has this functionality with different syntax.  I'm not convinced
it's of general enough value to add to bash, especially when a separate
binary (of obviously trivial complexity) does the job.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/

Reply via email to