From: Jens <jensl@laas.mine.nu>
To: musl@lists.openwall.com
Subject: semtcl for x86_64
Date: Sat, 22 Sep 2012 10:26:54 +0200 (CEST) [thread overview]
Message-ID: <alpine.LNX.2.02.1209221022130.26892@laas.mine.nu> (raw)
Hello I have some trouble getting semctl working:
Tried in both musl and uclibc to compare.
See below.
The only difference I can see is the IPC_64 flag.
(I haven't tried 32-bit).
Regards,
Jens
program:
bash-4.1# cat t.c
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>
main() {
int sem;
// semget(IPC_PRIVATE, 1, IPC_CREAT|0600) = 131076
sem = semget(IPC_PRIVATE, 1, IPC_CREAT);
semctl(sem, 0, SETVAL, 0x1);
}
musl:
bash-4.1# /bin64/strace ./m
execve("./m", ["./m"], [/* 19 vars */]) = 0
semget(IPC_PRIVATE, 1, IPC_CREAT|0) = 327688
semctl(327688, 0, IPC_64|SETVAL, 0x1) = -1 EINVAL (Invalid argument)
exit_group(-1) = ?
bash-4.1#
uclibc:
semget(IPC_PRIVATE, 1, IPC_CREAT|0) = 262150
semctl(262150, 0, SETVAL, 0x1) = 0
_exit(0) = ?
bash-4.1#
next reply other threads:[~2012-09-22 8:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-22 8:26 Jens [this message]
2012-09-22 9:17 ` Jens
2012-09-22 12:04 ` Rich Felker
2012-09-22 12:17 ` Jens
2012-09-22 12:25 ` Rich Felker
2012-09-22 17:09 ` Jens
2012-09-22 20:09 ` Rich Felker
2012-09-22 12:14 ` Jens
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=alpine.LNX.2.02.1209221022130.26892@laas.mine.nu \
--to=jensl@laas.mine.nu \
--cc=musl@lists.openwall.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).