my $sent = "foobar";
my $rcvd;
my $size = 2000;
- my $id = shmget(IPC_PRIVATE, $size, S_IRWXU) ||
- warn "# shmget failed: $!\n";
+ my $id = shmget(IPC_PRIVATE, $size, S_IRWXU);
+
if (defined $id) {
if (shmwrite($id, $sent, 0, 60)) {
if (shmread($id, $rcvd, 0, 60)) {
} else {
warn "# shmwrite failed: $!\n";
}
- shmctl($id, IPC_RMID, 0) || warn "# shmctl failed: $!\n";
+ shmctl($id, IPC_RMID, 0) or warn "# shmctl failed: $!\n";
} else {
warn "# shmget failed: $!\n";
}
} else {
warn "# msgsnd failed\n";
}
- msgctl($id, IPC_RMID, 0) || warn "# msgctl failed: $!\n";
+ msgctl($id, IPC_RMID, 0) or warn "# msgctl failed: $!\n";
} else {
warn "# msgget failed\n";
}