diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2003-08-05 06:28:06 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-08-05 06:28:06 +0000 |
commit | cab0dcf91472885c5e694c5a5a9da5a38760ac49 (patch) | |
tree | 2c4c90ba4e11da279988d6ff82630a733e8ee095 /ext/IPC/SysV/t/sem.t | |
parent | 2c2cb4122eb316f028f8d8303287fd2a55536c62 (diff) | |
download | perl-cab0dcf91472885c5e694c5a5a9da5a38760ac49.tar.gz |
[perl #23216] ext/IPC/SysV/t/sem.t don't remove semaphore on NetBSD sparc
Try to remove the created message queues and semaphores
even in the case of failures.
p4raw-id: //depot/perl@20490
Diffstat (limited to 'ext/IPC/SysV/t/sem.t')
-rwxr-xr-x | ext/IPC/SysV/t/sem.t | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/ext/IPC/SysV/t/sem.t b/ext/IPC/SysV/t/sem.t index b3c813c428..d506519804 100755 --- a/ext/IPC/SysV/t/sem.t +++ b/ext/IPC/SysV/t/sem.t @@ -35,8 +35,9 @@ use IPC::Semaphore; print "1..10\n"; -$sem = new IPC::Semaphore(IPC_PRIVATE, 10, S_IRWXU | S_IRWXG | S_IRWXO | IPC_CREAT) - || die "semget: ",$!+0," $!\n"; +my $sem = + new IPC::Semaphore(IPC_PRIVATE, 10, S_IRWXU | S_IRWXG | S_IRWXO | IPC_CREAT) + || die "semget: ",$!+0," $!\n"; print "ok 1\n"; @@ -68,5 +69,7 @@ print "ok 8\n"; print "not " if $sem->getncnt(0); print "ok 9\n"; -$sem->remove || print "not "; -print "ok 10\n"; +END { + (defined $sem && $sem->remove) || print "not "; + print "ok 10\n"; +} |