ALT Linux Team development discussions
 help / color / mirror / Atom feed
* [devel] 64-bit fcntl
@ 2000-10-16  5:52 Mikhail Zabaluev
  2000-10-17  9:49 ` Dmitry V. Levin
  0 siblings, 1 reply; 4+ messages in thread
From: Mikhail Zabaluev @ 2000-10-16  5:52 UTC (permalink / raw)
  To: devel

[-- Attachment #1: Type: text/plain, Size: 511 bytes --]

Доброе время суток.

Почему fcntl в режиме поддержки 64-битных файловых смещений не хочет
выполнять операцию F_SETLKW (она же F_SETLKW64)? Версия glibc - 2.1.95,
ядра - 2.2.17. Текст тестовой программы приложен.
Интересно, что strace как будто ничего не знает о константе F_SETLKW64:

fcntl(4, 0xe /* F_??? */, 0xbffff800)   = -1 EINVAL (Invalid argument)

-- 
Stay tuned,
  MhZ                                    mailto:mookid@sigent.ru
-----------
"If value corrupts then absolute value corrupts absolutely."

[-- Attachment #2: fcntl-test.c --]
[-- Type: text/plain, Size: 390 bytes --]

#define _FILE_OFFSET_BITS 64

#include <fcntl.h>
#include <stdio.h>


static struct flock lock = {
		F_WRLCK,
		SEEK_CUR,
		0,
		0,
		0
	};


int main() {

	int fd;

	fd = open("dummy_lockfile", O_WRONLY | O_CREAT, 0644);
	if (fd < 0) {
		perror("Cannot open dummy_lockfile");
		return 1;
	}

	if (fcntl(fd, F_SETLKW, &lock) < 0) {
		perror("F_SETLKW failed");
		return 2;
	}

	return 0;
}

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-10-17 22:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-10-16  5:52 [devel] 64-bit fcntl Mikhail Zabaluev
2000-10-17  9:49 ` Dmitry V. Levin
2000-10-17 21:24   ` Mikhail Zabaluev
2000-10-17 22:17     ` Dmitry V. Levin

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