--- cgx_2.18.orig/src/pickFunktions.c	2022-07-25 18:42:56.000000000 -0500
+++ cgx_2.18/src/pickFunktions.c	2022-07-25 19:18:21.000000000 -0500
@@ -35,6 +35,8 @@
 
 #include <cgx.h>
 
+#include <semaphore.h>
+
 #define DPICK_BUFFER 10000
 #define MAX_BUF      100
 
@@ -4594,7 +4594,7 @@ void moveLineEndPoint(int lineNr, int pntNr, double ll
     else
     {
       printf("ERROR: selected point:%s is no line endpoint\n", point[pntNr].name);
-      return(-1);
+      return;
     }
     u=flag*llength;
     u/=scale->w;
@@ -7535,7 +7537,9 @@
     /* daten der geschnittenen elemente */
     if ((cutParam=(CutParam *)malloc((anz->emax+1)*sizeof(CutParam)) ) == NULL ) { printf(" ERROR: malloc failure\n\n"); return;}
 
-    if(sem_init(&sem_cute, 0, 1) < 0) printf("Error in:sem_init\n");
+    sem_t *cptr = sem_open("/sem_cute", O_CREAT, 0644, 1);
+    sem_unlink("/sem_cute");
+    if((cptr == SEM_FAILED)) printf("Error in:sem_open\n");
     if(threads>anz->e) { nlocalThreads=anz->e; }
     else nlocalThreads=threads;
     //nlocalThreads=1;
@@ -7563,7 +7566,7 @@
     glob_cutElement=0;
     free(tid); tid=NULL;
     free(targ); targ=NULL;
-    if(sem_destroy(&sem_cute) < 0) printf("Error in:sem_init\n");
+    if(sem_close(cptr) < 0) printf("Error in:sem_open\n");
 
     for(e=1; e<anz_e; e++)
     {
