ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: mookid@sigent.ru (Mikhail Zabaluev)
To: devel@linux.iplabs.ru
Subject: [devel] 64-bit fcntl
Date: Mon, 16 Oct 2000 09:52:46 +0400
Message-ID: <20001016095246.A871@localhost.localdomain> (raw)

[-- 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;
}

             reply	other threads:[~2000-10-16  5:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-16  5:52 Mikhail Zabaluev [this message]
2000-10-17  9:49 ` Dmitry V. Levin
2000-10-17 21:24   ` Mikhail Zabaluev
2000-10-17 22:17     ` 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=20001016095246.A871@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