From: mookid@sigent.ru (Mikhail Zabaluev) To: devel@linux.iplabs.ru Subject: [devel] 64-bit fcntl() Date: Wed, 6 Dec 2000 21:26:54 +0300 Message-ID: <20001206212654.A19896@localhost.localdomain> (raw) [-- Attachment #1: Type: text/plain, Size: 571 bytes --] Доброе время суток. "Крупнофайловый" fcntl() с ядром 2.2.17-ipl3mdk и glibc-2.2-ipl1mdk все-таки ведет себя странно: на F_SETLKW по файлу, залоченному другим процессом, выдает EAGAIN, как при неблокирующем вызове. Для проверки прилагаю программку, которую нужно запустить в одном рабочем каталоге в двух экземплярах (один в background, другой в foreground). При нормальной работе fcntl() foreground'ный процесс должен зависнуть. Помогите, люди добрые, ведь Апач с Perl 5.6.0 не работает! -- Stay tuned, MhZ mailto:mookid@sigent.ru [-- Attachment #2: locktest64.c --] [-- Type: text/plain, Size: 517 bytes --] #define _FILE_OFFSET_BITS 64 #include <fcntl.h> #include <stdio.h> #include <unistd.h> static struct flock lock = { F_WRLCK, SEEK_CUR, 0L, 0L }; int main () { static int fd; fd = open("dummy.lock", O_RDWR | O_CREAT, 0644); if (fd < 0) { perror("cannot open lockfile"); return 1; } if (fcntl(fd, F_SETLKW, &lock) == -1) { perror("cannot obtain exclusive lock"); return 2; } pause(); close(fd); return 0; }
next reply other threads:[~2000-12-06 18:26 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2000-12-06 18:26 Mikhail Zabaluev [this message] 2000-12-20 20:18 ` Dmitry V. Levin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20001206212654.A19896@localhost.localdomain \ --to=mookid@sigent.ru \ --cc=devel@linux.iplabs.ru \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Team development discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \ devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru public-inbox-index devel Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.devel AGPL code for this site: git clone https://public-inbox.org/public-inbox.git