Add a way to unlink the semaphore
This commit is contained in:
parent
cf5c30e7cc
commit
615c28d737
1 changed files with 3 additions and 0 deletions
3
herbe.c
3
herbe.c
|
@ -86,7 +86,10 @@ void action()
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
if (argc == 1)
|
if (argc == 1)
|
||||||
|
{
|
||||||
|
sem_unlink("/herbe");
|
||||||
die("Usage: %s body", argv[0]);
|
die("Usage: %s body", argv[0]);
|
||||||
|
}
|
||||||
|
|
||||||
signal(SIGALRM, expire);
|
signal(SIGALRM, expire);
|
||||||
signal(SIGTERM, expire);
|
signal(SIGTERM, expire);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue