Skip to content

Commit

Permalink
declare fd
Browse files Browse the repository at this point in the history
  • Loading branch information
vladak committed Dec 8, 2024
1 parent 9a520dd commit 67afb79
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions synchro.tex
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@
\end{itemize}
\begin{alltt}
void \funnm{lock}(char *lockfile) \{
int fd;
while((fd = open(lockfile,
O\_RDWR|O\_CREAT|\emprg{O\_EXCL}, 0600)) == -1) \{
sleep(1); {\rm/* busy waiting in loop for unlock */}
Expand Down

0 comments on commit 67afb79

Please sign in to comment.