mksh exec bug.

Paweł Sikora pluto at agmk.net
Sat Jan 14 15:56:08 CET 2012


On Saturday 14 of January 2012 15:50:12 Paweł Sikora wrote:
> witam,
> 
> jak juz pisalem na users, przestal mi dzialac suspend w kde.
> ztcw, to winny jest mksh, ktory wyklada sie na czyms takim:
> 
> $ LANG=C /bin/mksh -x try.sh
> + lock=test.lock
> + touch test.lock
> + exec
> + 3<test.lock
> + flock -x -n 3
> flock: 3: Bad file descriptor
> + exit 1
> 
> w zsh/bash dziala to zgodnie z opisem, a mksh ssie.
> 
> http://pubs.opengroup.org/onlinepubs/007904975/utilities/exec.html
> 

zapomnialem zalacznika:

#!/bin/mksh

lock="test.lock"
touch "${lock}"
exec 3<"${lock}"
flock -x -n 3 || exit 1
exit 0



More information about the pld-devel-pl mailing list