cvs commit: apache/src CHANGES conf.h http_main.c rfc1413.c
fielding97/05/28 21:50:29 Modified:src CHANGES conf.h http_main.c rfc1413.c Log: Fixed problem on Irix with servers hanging in IdentityCheck, apparently due to a mismatch between sigaction and setjmp. Submitted by: Roy Fielding, PR#502 Reviewed by: Jim Jagielski, Randy Terbush, Dean Gaudet Revision ChangesPath 1.283 +4 -0 apache/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apache/src/CHANGES,v retrieving revision 1.282 retrieving revision 1.283 diff -C3 -r1.282 -r1.283 *** CHANGES 1997/05/29 04:23:11 1.282 --- CHANGES 1997/05/29 04:50:25 1.283 *** *** 3,8 --- 3,12 *) Added undocumented perl SSI mechanism for -DUSE_PERL_SSI and mod_perl. [Rob Hartill] + *) Fixed problem on Irix with servers hanging in IdentityCheck, + apparently due to a mismatch between sigaction and setjmp. + [Roy Fielding] PR#502 + *) Log correct status code if we timeout before receiving a request (408) or if we received a request-line that was too long to process (414). [Ed Korthof and Roy Fielding] PR#601 1.98 +10 -1 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.97 retrieving revision 1.98 diff -C3 -r1.97 -r1.98 *** conf.h1997/05/01 17:36:24 1.97 --- conf.h1997/05/29 04:50:26 1.98 *** *** 61,67 /* Define one of these according to your system. */ #if defined(MPE) - #include setjmp.h #include sys/times.h #define JMP_BUF sigjmp_buf #define NO_SETSID --- 61,66 *** *** 650,655 --- 649,664 #endif #define signal(s,f) ap_signal(s,f) Sigfunc *signal(int signo, Sigfunc *func); + #endif + + #include setjmp.h + + #if defined(USE_LONGJMP) + #define ap_longjmp(x, y)longjmp((x), (y)) + #define ap_setjmp(x)setjmp(x) + #else + #define ap_longjmp(x, y)siglongjmp((x), (y)) + #define ap_setjmp(x)sigsetjmp((x), 1) #endif /* Finding offsets of elements within structures. 1.149 +0 -9 apache/src/http_main.c Index: http_main.c === RCS file: /export/home/cvs/apache/src/http_main.c,v retrieving revision 1.148 retrieving revision 1.149 diff -C3 -r1.148 -r1.149 *** http_main.c 1997/05/29 03:10:52 1.148 --- http_main.c 1997/05/29 04:50:27 1.149 *** *** 84,90 #include http_conf_globals.h #include http_core.h /* for get_remote_host */ #include scoreboard.h - #include setjmp.h #include assert.h #include sys/stat.h #ifdef HAVE_SHMGET --- 84,89 *** *** 180,193 #define ap_killpg(x, y) (kill (-(x), (y))) #else #define ap_killpg(x, y) (killpg ((x), (y))) - #endif - - #if defined(USE_LONGJMP) - #define ap_longjmp(x, y)(longjmp ((x), (y))) - #define ap_setjmp(x)(setjmp (x)) - #else - #define ap_longjmp(x, y)(siglongjmp ((x), (y))) - #define ap_setjmp(x)(sigsetjmp ((x), 1)) #endif #if defined(USE_FCNTL_SERIALIZED_ACCEPT) --- 179,184 1.10 +10 -14apache/src/rfc1413.c Index: rfc1413.c === RCS file: /export/home/cvs/apache/src/rfc1413.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C3 -r1.9 -r1.10 *** rfc1413.c 1997/03/07 17:43:36 1.9 --- rfc1413.c 1997/05/29 04:50:27 1.10 *** *** 72,85 /* Rewritten by David Robinson */ ! #include httpd.h/* for server_rec, conn_rec */ #include http_log.h /* for log_unixerr */ #include rfc1413.h - /* System libraries. */ - - #include setjmp.h - #ifndef SCO extern char *strchr(); extern char *inet_ntoa(); --- 72,81 /* Rewritten by David Robinson */ ! #include httpd.h/* for server_rec, conn_rec, ap_longjmp, etc. */ #include http_log.h /* for log_unixerr */ #include rfc1413.h #ifndef SCO extern char *strchr(); extern char *inet_ntoa(); *** *** 93,105 /* rough limit on the amount of data we accept. */ #define RFC1413_MAXDATA 1000 #define RFC1413_TIMEOUT 30 #define ANY_PORT0 /* Any old port will do */ #define FROM_UNKNOWN unknown ! int rfc1413_timeout = RFC1413_TIMEOUT;/* Global so it can be changed */ ! ! static jmp_buf timebuf; /* bind_connect - bind both ends of a socket */ --- 89,101 /*
cvs commit: apache/src CHANGES conf.h
chuck 97/04/08 18:40:55 Modified:src CHANGES conf.h Log: Reviewed by: Chuck Murcko Submitted by: Marc Slemko Add #define for memmove for SUNOS4. Revision ChangesPath 1.227 +8 -1 apache/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apache/src/CHANGES,v retrieving revision 1.226 retrieving revision 1.227 diff -C3 -r1.226 -r1.227 *** CHANGES 1997/04/07 17:49:28 1.226 --- CHANGES 1997/04/09 01:40:49 1.227 *** *** 1,5 Changes with Apache 1.2b8 ! *) suexec.c doesn't close the log file, allowing CGIs to continue writing to it. [Marc Slemko] --- 1,12 + Changes with Apache 1.2b9 + + *) add macro for memmove to conf.h for SUNOS4 [Marc Slemko] + + *) Proxy cleanup for transmission errors; avoids core dumps an some + of the truncated files. [Chuck Murcko] + Changes with Apache 1.2b8 ! *) suexec.c doesn't close the log file, allowing CGIs to continue writing to it. [Marc Slemko] 1.92 +1 -0 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.91 retrieving revision 1.92 diff -C3 -r1.91 -r1.92 *** conf.h1997/04/07 09:44:17 1.91 --- conf.h1997/04/09 01:40:51 1.92 *** *** 86,91 --- 86,92 #include sys/time.h #define NEED_STRERROR typedef int rlim_t; + #define memmove(a,b,c) bcopy(b,a,c) #define NO_LINGCLOSE #elif defined(SOLARIS2)
cvs commit: apache/src CHANGES conf.h
fielding97/03/28 17:42:35 Modified:src CHANGES conf.h Log: Defined HAVE_SHMGET for shared memory on Linux. Submitted by: Dean Gaudet Reviewed by: Jim Jagielski, Roy Fielding Revision ChangesPath 1.212 +2 -0 apache/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apache/src/CHANGES,v retrieving revision 1.211 retrieving revision 1.212 diff -C3 -r1.211 -r1.212 *** CHANGES 1997/03/24 22:49:08 1.211 --- CHANGES 1997/03/29 01:42:32 1.212 *** *** 1,5 --- 1,7 Changes with Apache 1.2b8 + *) Defined HAVE_SHMGET for shared memory on Linux. [Dean Gaudet] + *) Report extra info from errno with many errors that cause httpd to exit. spawn_child, popenf, and pclosef now have valid errno returns in the event of an error. Correct problems where errno was stomped on 1.89 +1 -0 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.88 retrieving revision 1.89 diff -C3 -r1.88 -r1.89 *** conf.h1997/03/24 22:54:51 1.88 --- conf.h1997/03/29 01:42:32 1.89 *** *** 254,259 --- 254,260 #undef NO_KILLPG #undef NO_SETSID #undef NEED_STRDUP + #define HAVE_SHMGET #define JMP_BUF sigjmp_buf #define USE_FCNTL_SERIALIZED_ACCEPT #include sys/time.h
Re: cvs commit: apache/src CHANGES conf.h http_core.c http_main.c http_protocol.c mod_fastcgi.c util.c
Randy Terbush [EMAIL PROTECTED] writes: randy 96/12/27 16:04:58 Modified:src CHANGES conf.h http_core.c http_main.c http_protocol.c mod_fastcgi.c util.c Log: OS/2 changes to support MMAP style scoreboard file and UNIX style #! tokens for better script portability. Submitted by: Garey Smiley Somebody lifted the feature freeze? Don't remember seeing a bug report about this! -- Paul Richards. Originative Solutions Ltd. (Netcraft Ltd. contractor) Elsevier Science TIS online journal project. Email: [EMAIL PROTECTED] Phone: 0370 462071 (Mobile), +44 (0)1865 843155
cvs commit: apache/src CHANGES conf.h http_core.c http_main.c http_protocol.c mod_fastcgi.c util.c
randy 96/12/27 16:04:58 Modified:src CHANGES conf.h http_core.c http_main.c http_protocol.c mod_fastcgi.c util.c Log: OS/2 changes to support MMAP style scoreboard file and UNIX style #! tokens for better script portability. Submitted by: Garey Smiley Revision ChangesPath 1.103 +3 -0 apache/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apache/src/CHANGES,v retrieving revision 1.102 retrieving revision 1.103 diff -C3 -r1.102 -r1.103 *** CHANGES 1996/12/27 23:39:40 1.102 --- CHANGES 1996/12/28 00:04:48 1.103 *** *** 1,5 --- 1,8 Changes with Apache 1.2b4: + *) OS/2 changes to support an MMAP style scoreboard file and UNIX + style magic #! token for better script portability. [Garey Smiley] + *) Fix bug in suexec wrapper introduced in b3 that would cause failed execution for ~userdir CGI. [Jason Dour] 1.62 +6 -1 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.61 retrieving revision 1.62 diff -C3 -r1.61 -r1.62 *** conf.h1996/12/20 16:27:17 1.61 --- conf.h1996/12/28 00:04:49 1.62 *** *** 398,404 /* Add some drive name support */ #define chdir _chdir2 #include sys/time.h ! #define MAXSOCKETS 200 /* Unknown system - Edit these to match */ --- 398,406 /* Add some drive name support */ #define chdir _chdir2 #include sys/time.h ! #define MAXSOCKETS 4096 ! #define ARG_MAX_POSIX_ARG_MAX ! #define HAVE_MMAP /* Unknown system - Edit these to match */ *** *** 480,486 --- 482,491 #endif #endif #ifdef HAVE_MMAP + #ifndef __EMX__ + /* This file is not needed for OS/2 */ #include sys/mman.h + #endif #endif #if !defined(MAP_ANON) defined(MAP_ANONYMOUS) #define MAP_ANON MAP_ANONYMOUS 1.54 +4 -0 apache/src/http_core.c Index: http_core.c === RCS file: /export/home/cvs/apache/src/http_core.c,v retrieving revision 1.53 retrieving revision 1.54 diff -C3 -r1.53 -r1.54 *** http_core.c 1996/12/17 20:30:46 1.53 --- http_core.c 1996/12/28 00:04:49 1.54 *** *** 605,610 --- 605,614 if (cmd-limited != -1) return Can't have Directory within Limit; cmd-path = getword_conf (cmd-pool, arg); + #ifdef __EMX__ + /* Fix OS/2 HPFS filename case problem. */ + cmd-path = strlwr(cmd-path); + #endif cmd-override = OR_ALL|ACCESS_CONF; if (!strcmp(cmd-path, ~)) { 1.98 +93 -1 apache/src/http_main.c Index: http_main.c === RCS file: /export/home/cvs/apache/src/http_main.c,v retrieving revision 1.97 retrieving revision 1.98 diff -C3 -r1.97 -r1.98 *** http_main.c 1996/12/24 19:17:50 1.97 --- http_main.c 1996/12/28 00:04:50 1.98 *** *** 109,114 --- 109,127 #include explain.h + #ifdef __EMX__ + /* Add MMAP style functionality to OS/2 */ + #ifdef HAVE_MMAP + #define INCL_DOSMEMMGR + #include os2.h + #include umalloc.h + #include stdio.h + caddr_t create_shared_heap (const char *, size_t); + caddr_t get_shared_heap (const char *); + #endif + #endif + + DEF_Explain /* *** *** 517,523 static void setup_shared_mem(void) { caddr_t m; ! #if defined(MAP_ANON) || defined(MAP_FILE) /* BSD style */ m = mmap((caddr_t)0, SCOREBOARD_SIZE, PROT_READ | PROT_WRITE, MAP_ANON | MAP_SHARED, -1, 0); --- 530,552 static void setup_shared_mem(void) { caddr_t m; ! ! #ifdef __EMX__ ! char errstr[MAX_STRING_LEN]; ! int rc; ! ! m = (caddr_t)create_shared_heap(\\SHAREMEM\\SCOREBOARD, HARD_SERVER_LIMIT*sizeof(short_score)); ! if(m == 0) { !fprintf(stderr, httpd: Could not create OS/2 Shared memory pool.\n); !exit(1); ! } ! ! rc = _uopen((Heap_t)m); ! if(rc != 0) { !fprintf(stderr, httpd: Could not uopen() newly created OS/2 Shared memory pool.\n); ! } ! ! #elif defined(MAP_ANON) || defined(MAP_FILE) /* BSD style */ m = mmap((caddr_t)0, SCOREBOARD_SIZE, PROT_READ | PROT_WRITE, MAP_ANON | MAP_SHARED, -1, 0); *** *** 736,741 --- 765,787 perror (scoreboard_fname); exit (1); }
cvs commit: apache/src CHANGES conf.h
randy 96/12/10 07:07:44 Modified:src CHANGES conf.h Log: NetBSD apparently doesn't need this typedef for rlim_t. Revision ChangesPath 1.82 +4 -0 apache/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apache/src/CHANGES,v retrieving revision 1.81 retrieving revision 1.82 diff -C3 -r1.81 -r1.82 *** CHANGES 1996/12/10 01:11:57 1.81 --- CHANGES 1996/12/10 15:07:41 1.82 *** *** 1,3 --- 1,7 + Changes with Apache 1.2b3: + + *) Remove rlim_t typedef for NetBSD. Do older versions need this? + Changes with Apache 1.2b2: *) Update set_signals() to use sigaction() for setting handlers. 1.57 +0 -1 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.56 retrieving revision 1.57 diff -C3 -r1.56 -r1.57 *** conf.h1996/12/09 05:00:42 1.56 --- conf.h1996/12/10 15:07:41 1.57 *** *** 320,326 #define JMP_BUF sigjmp_buf #define DEFAULT_USER nobody #define DEFAULT_GROUP nogroup - typedef quad_t rlim_t; #elif defined(UTS21) #undef HAVE_GMTOFF --- 320,325
cvs commit: apache/src CHANGES conf.h http_main.c
ben 96/07/17 16:20:52 Modified:src CHANGES conf.h http_main.c Log: Work around broken wait() behaviour in Irix (and perhaps others). Revision ChangesPath 1.44 +4 -0 apache/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apache/src/CHANGES,v retrieving revision 1.43 retrieving revision 1.44 diff -C3 -r1.43 -r1.44 *** CHANGES 1996/07/17 08:33:40 1.43 --- CHANGES 1996/07/17 23:20:47 1.44 *** *** 6,11 --- 6,15 *) Graceful restart code added. This allows the server to restart without losing current connections on receipt of signal 2 (SIGINT). [Ben Laurie] + *) Added BROKEN_WAIT flag to conf.h, to be used on systems which fail to + reap their children correctly (symptom: mod_status shows children which + don't exist). [Ben Laurie] + Changes with Apache 1.1.1: *) Fixed bug where Cookie module would make two entries in the 1.22 +1 -0 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.21 retrieving revision 1.22 diff -C3 -r1.21 -r1.22 *** conf.h1996/07/17 15:09:58 1.21 --- conf.h1996/07/17 23:20:49 1.22 *** *** 94,99 --- 94,100 #define HAVE_SHMGET #define HAVE_CRYPT_H #define NO_LONG_DOUBLE + #define BROKEN_WAIT #elif defined(HPUX) || defined(HPUX10) #define HAVE_RESOURCE 1.51 +29 -2 apache/src/http_main.c Index: http_main.c === RCS file: /export/home/cvs/apache/src/http_main.c,v retrieving revision 1.50 retrieving revision 1.51 diff -C3 -r1.50 -r1.51 *** http_main.c 1996/07/16 22:14:54 1.50 --- http_main.c 1996/07/17 23:20:50 1.51 *** *** 937,945 #endif } int wait_or_timeout (int *status) { ! wait_or_timeout_retval = -1; #if defined(NEXT) if (setjmp(wait_timeout_buf) != 0) { --- 937,966 #endif } + #ifdef BROKEN_WAIT + /* + Some systems appear to fail to deliver dead children to wait() at times. + This sorts them out. + */ + void reap_children() + { + int status,n; + + for(n=0 ; n HARD_SERVER_LIMIT ; ++n) + if(scoreboard_image-servers[n].status != SERVER_DEAD + waitpid(scoreboard_image-servers[n].pid,status,WNOHANG) == -1 + errno == ECHILD) + { + sync_scoreboard_image(); + update_child_status(n,SERVER_DEAD,NULL); + } + } + #endif + int wait_or_timeout (int *status) { ! int wait_or_timeout_retval = -1; ! static int ntimes; #if defined(NEXT) if (setjmp(wait_timeout_buf) != 0) { *** *** 949,955 errno = ETIMEDOUT; return wait_or_timeout_retval; } ! signal (SIGALRM, longjmp_out_of_alarm); alarm(1); #if defined(NEXT) --- 970,982 errno = ETIMEDOUT; return wait_or_timeout_retval; } ! #ifdef BROKEN_WAIT ! if(++ntimes == 60) ! { ! reap_children(); ! ntimes=0; ! } ! #endif signal (SIGALRM, longjmp_out_of_alarm); alarm(1); #if defined(NEXT)
cvs commit: apache/src CHANGES conf.h http_bprintf.c
ben 96/06/29 13:02:48 Modified:src CHANGES conf.h http_bprintf.c Log: Bring QNX support up to date. Revision ChangesPath 1.37 +2 -0 apache/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apache/src/CHANGES,v retrieving revision 1.36 retrieving revision 1.37 diff -C3 -r1.36 -r1.37 *** CHANGES 1996/06/29 19:52:10 1.36 --- CHANGES 1996/06/29 20:02:46 1.37 *** *** 1,3 --- 1,5 + *) Bring QNX support up to date. [Ben Laurie] + *) Make virtual hosts default to main server keepalive parameters. [Alexei Kosut, Ben Laurie] 1.17 +1 -0 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C3 -r1.16 -r1.17 *** conf.h1996/06/26 10:46:36 1.16 --- conf.h1996/06/29 20:02:46 1.17 *** *** 295,300 --- 295,301 #undef NO_KILLPG #undef NO_SETSID #define NEED_INITGROUPS + #define NEED_SELECT_H #define JMP_BUF sigjmp_buf #elif defined(LYNXOS) 1.3 +2 -0 apache/src/http_bprintf.c Index: http_bprintf.c === RCS file: /export/home/cvs/apache/src/http_bprintf.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C3 -r1.2 -r1.3 *** http_bprintf.c1996/05/28 02:55:23 1.2 --- http_bprintf.c1996/06/29 20:02:47 1.3 *** *** 17,23 --- 17,25 #include stdlib.h #include stdarg.h #include string.h + #ifndef QNX #include memory.h + #endif #include assert.h #include math.h #include alloc.h
cvs commit: apache/src CHANGES conf.h http_main.c mod_cgi.c mod_userdir.c
jim 96/03/17 17:55:57 Modified:src CHANGES conf.h http_main.c mod_cgi.c mod_userdir.c CHANGES conf.h http_main.c mod_cgi.c mod_userdir.c - conf.h: Added FLOCK_SERIALIZED_ACCEPT to A/UX http_main.c: created FLOCK_SERIALIZED_ACCEPT for systems that need it, but using fcntl() locking is expensive (esp. running NFS) mod_cgi.c: Cliff Skolnick's read_client_block check mod_userdir.c: If we hit the end of the UserDir list, and we haven't found a file, return NOT_FOUND; we were returning OK before with junk in the r-filename slot Log: Committing in apache/src Revision ChangesPath 1.11 +11 -0 apache/src/CHANGES Index: CHANGES === RCS file: /export/home/cvs/apache/src/CHANGES,v retrieving revision 1.10 retrieving revision 1.11 diff -C3 -r1.10 -r1.11 *** CHANGES 1996/03/17 08:41:32 1.10 --- CHANGES 1996/03/18 01:55:35 1.11 *** *** 1,3 --- 1,14 + *) Added FLOCK_SERIALIZED_ACCEPT for those systems, like A/UX, + that need mutex-capability but using fcntl-locking is + expensive. [Jim Jagielski] + + *) Fixed translate_userdir(): return NOT_FOUND when at the end + of the UserDir list (was returning OK and junk in the filename). + [Jim Jagielski] + + *) Added in Cliff Skolnick's read_client_block patch (check for + no reads and break) [Jim Jagielski] + *) If there was no default MIME type defined, Apache sent Content-type: without a newline, thus swallowing the next header. Changed to send no Content-type: at all. [Ben Laurie] 1.9 +2 -0 apache/src/conf.h Index: conf.h === RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C3 -r1.8 -r1.9 *** conf.h1996/03/15 11:28:24 1.8 --- conf.h1996/03/18 01:55:37 1.9 *** *** 224,229 --- 224,231 #undef NO_SETSID #define NEED_STRDUP #define JMP_BUF sigjmp_buf + /* fcntl() locking is expensive with NFS */ + #define FLOCK_SERIALIZED_ACCEPT #define HAVE_SHMGET #define MOVEBREAK 0x400 1.9 +65 -4 apache/src/http_main.c Index: http_main.c === RCS file: /export/home/cvs/apache/src/http_main.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C3 -r1.8 -r1.9 *** http_main.c 1996/03/15 11:28:25 1.8 --- http_main.c 1996/03/18 01:55:38 1.9 *** *** 145,158 int one_process = 0; ! #ifdef FCNTL_SERIALIZED_ACCEPT static struct flock lock_it = { F_WRLCK, 0, 0, 0 }; static struct flock unlock_it = { F_UNLCK, 0, 0, 0 }; static int lock_fd=-1; /* ! * Initialise mutex lock. * Must be safe to call this on a restart. */ void --- 145,158 int one_process = 0; ! #if defined(FCNTL_SERIALIZED_ACCEPT) static struct flock lock_it = { F_WRLCK, 0, 0, 0 }; static struct flock unlock_it = { F_UNLCK, 0, 0, 0 }; static int lock_fd=-1; /* ! * Initialize mutex lock. * Must be safe to call this on a restart. */ void *** *** 172,178 if (lock_fd == -1) { perror (open); ! fprintf (stderr, Cannot open lcok file\n); exit (1); } unlink(lock_fname); --- 172,178 if (lock_fd == -1) { perror (open); ! fprintf (stderr, Cannot open lock file\n); exit (1); } unlink(lock_fname); *** *** 201,206 --- 201,260 exit(1); } } + #elif defined(FLOCK_SERIALIZED_ACCEPT) + + static int lock_fd=-1; + + /* + * Initialize mutex lock. + * Must be safe to call this on a restart. + */ + void + accept_mutex_init(pool *p) + { + char lock_fname[30]; + + strcpy(lock_fname, /usr/tmp/htlock.XX); + + if (mktemp(lock_fname) == NULL || lock_fname[0] == '\0') + { + fprintf (stderr, Cannot assign name to lock file!\n); + exit (1); + } + + lock_fd = popenf(p, lock_fname, O_CREAT | O_WRONLY, 0644); + if (lock_fd == -1) + { + perror (open); + fprintf (stderr, Cannot open lock file\n); + exit (1); + } + unlink(lock_fname); + } + + void accept_mutex_on() + { + int ret;