commit 615c28d7370dff1abe3b63a8e1477bf462bcd83b parent cf5c30e7ccb3fb2cf67be36061d34f361a654519 Author: Samuel Dudik <samuel.dudik@gmail.com> Date: Sat, 15 Aug 2020 20:16:31 +0200 Add a way to unlink the semaphore Diffstat:
M | herbe.c | | | 3 | +++ |
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/herbe.c b/herbe.c @@ -86,7 +86,10 @@ void action() int main(int argc, char *argv[]) { if (argc == 1) + { + sem_unlink("/herbe"); die("Usage: %s body", argv[0]); + } signal(SIGALRM, expire); signal(SIGTERM, expire);