Re: [PATCH 1/2] t_ofd_locks: fix stalled semaphore handling

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]




11.08.2023 16:39, Jeff Layton пишет:
Given that you're now creating the semaphore before launching the test
program, do you need to clean it up if the shell script dies
abnormally?

I'd rather say "no" or at least I wasn't
planning that. Unlike the current impl
in C code, ipcmk creates the sem with
random ID, so the clash is no longer a
threat. As such we don't care about any
previous invocations, were they
successful or faulty. Which is yet another
advantage of this approach. rm_sem()
is here just for "politeness", whereas
in prev approach you have to deal with
the results of the past invocations.



Seems like a reasonable change overall, and I like not having to
micromanage the semaphore inside the C program. The cleanup thing can be
fixed after the fact if it's even necessary.

Reviwed-by: Jeff Layton <jlayton@xxxxxxxxxx>
Thank you!



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux