- if ($str eq "") {
- $str = time().": "; # time stamping, null.
- } elsif ($read eq "") {
- $str = time().": "; # timestamping.
- } else {
- $str = $read ."||". $str;
+ if (length($str) == 0) {
+ # does $size overwrite the whole lot?
+ # if not, set to 2000.
+ if (!shmwrite($key, '', $position, $size)) {
+ &ERROR("shmWrite: failed: $!");