in reply to How to lock other users from using Serialport under Linux ?

Have you tried initialising the object with the lockfile parameter to obtain exclusive ownership of the port?
$PortObj = new Device::SerialPort ($PortName, $quiet, $lockfile) || die "Can't open $PortName: $!\n";
This is from the Device::SerialPort documentation.

Hope this helps

Martin