Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

POSIX message queues

Name: Anonymous 2008-05-20 9:22

I want to create am message queue using POSIX mq_open(), unfortunately no message queue is created and mq_open() only returns -1.

Any ideas how i could get more information why mq_open() failed or how i could debug it further?


#include <mqueue.h>
...
#define MAX_MSG   100
#define OVER      (-1)
#define PMODE     0666
#define QUEUENAME "/myipc"
#define QUEUESIZE 10
...
mqd_t id;
struct mq_attr attr;
attr.mq_maxmsg = QUEUESIZE;
attr.mq_msgsize = sizeof (int);
attr.mq_flags = 0;

id = mq_open (QUEUENAME, O_RDWR, PMODE, &attr);

Name: Anonymous 2008-05-20 9:26

USE WINDOWS!

Name: Anonymous 2008-05-20 9:36

Yeah, Windows is way better. I tried Debian, but I can't get the DVD drive to work (after about five hours of trying). Stick with Windows if you don't want to spend more time configuring your system than actually using it.

Name: Anonymous 2008-05-20 9:43

>>2
>>3
/g/ is that way, seriously -->

Name: Anonymous 2008-05-20 9:44

>>4
If I wanted help, I'd ask /g/.

Name: Anonymous 2008-05-20 10:09

>>5
If I wanted my anus haxed, I'd ask /prog/.

Name: Anonymous 2008-05-20 10:24

USE MAC OS!

Name: Anonymous 2008-05-20 10:26

>>3
You can use both at the same time. It's called Ubanto.

Name: Anonymous 2008-05-20 10:43

>>8
Debian is Ubanto.

Name: Anonymous 2008-05-20 10:52

>>1
The mq_open() function is marked as part of the Message Passing option.
It's optional. It may be that your system does not support it.

Name: Anonymous 2008-05-20 10:53

>>10
http://www.opengroup.org/onlinepubs/000095399/functions/mq_open.html
P.S. Look at errno and the ERRORS section of that page, and you'll find out why it fails.

Name: Anonymous 2008-05-20 12:33

Short answer -

#include <errno>
#include <string.h>
#include <stdio.h>

fprintf( stderr, "Reason it is fucking up: %s\n", strerror( errno ) );

Name: Anonymous 2008-05-20 12:51


┌────────────────────────────────────────────────┒
│ ◕                   REASON                   ◕ ┃
│                  Version 1.0B7                 ┃
│ Gatling type 3 mm hypervelocity railgun system ┃
│            Ng Security Industries, Inc.        ┃
│        PRERELEASE VERSION-NOT FOR FIELD USE    ┃
│          DO NOT TEST IN A POPULATED AREA       ┃
│ ◕             -ULTIMA RATIO REGUM-           ◕ ┃
┕━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

Name: Anonymous 2008-05-20 13:00

◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕◕

Name: Anonymous 2008-05-20 13:01

>>14
How depressing.

Name: Anonymous 2008-05-20 13:02

>>13
Everyone listens to Reason.

Name: Anonymous 2008-05-20 13:06

    ┌────────────────────────────────────────────────┒
    │ ◕                   REASON                   ◕ ┃
    │                  Version 1.0B7                 ┃
    │ Gatling type 3 mm hypervelocity railgun system ┃
    │            Ng Security Industries, Inc.        ┃
    │        PRERELEASE VERSION-NOT FOR FIELD USE    ┃
    │          DO NOT TEST IN A POPULATED AREA       ┃
    │ ◕             -ULTIMA RATIO REGUM-           ◕ ┃
    ┕━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

    ┌────────────────────────────────────────────────┒
    │ ◕                   REASON                   ◕ ┃
    │                  Version 1.0B7                 ┃
    │ Gatling type 3 mm hypervelocity railgun system ┃
    │            Ng Security Industries, Inc.        ┃
    │        PRERELEASE VERSION-NOT FOR FIELD USE    ┃
    │          DO NOT TEST IN A POPULATED AREA       ┃
    │ ◕             -ULTIMA RATIO REGUM-           ◕ ┃
    ┕━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

    ┌────────────────────────────────────────────────┒
    │ ◕                   REASON                   ◕ ┃
    │                  Version 1.0B7                 ┃
    │ Gatling type 3 mm hypervelocity railgun system ┃
    │            Ng Security Industries, Inc.        ┃
    │        PRERELEASE VERSION-NOT FOR FIELD USE    ┃
    │          DO NOT TEST IN A POPULATED AREA       ┃
    │ ◕             -ULTIMA RATIO REGUM-           ◕ ┃
    ┕━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

Name: Anonymous 2008-05-20 13:10

┌────────────────────────────────────────────────┒
│ ◕                   REASON                   ◕ ┃
│                  Version 1.0B7                 ┃
│ Gatling type 3 mm hypervelocity railgun system ┃
│            Ng Security Industries, Inc.        ┃
│        PRERELEASE VERSION-NOT FOR FIELD USE    ┃
│          DO NOT TEST IN A POPULATED AREA       ┃
│ ◕             -ULTIMA RATIO REGUM-           ◕ ┃
┕━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

Name: Anonymous 2008-05-20 13:10

┌────────────────────────────────────────────────┒
│ ◕                   REASON                   ◕ ┃
│                  Version 1.0B7                 ┃
│ Gatling type 3 mm hypervelocity railgun system ┃
│            Ng Security Industries, Inc.        ┃
│        PRERELEASE VERSION-NOT FOR FIELD USE    ┃
│          DO NOT TEST IN A POPULATED AREA       ┃
│ ◕             -ULTIMA RATIO REGUM-           ◕ ┃
┕━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

Name: Anonymous 2008-05-20 13:23

>>17,18
WHAT ARE YOU DOING

Name: Anonymous 2008-05-20 13:27

>>11
>>12
OP here, Thank you, i found out it was a permissions problem with /dev/mqueue/. Now fixed.

Name: Anonymous 2008-05-20 13:28

∵∴∵∴∵∴∵∴∵∴∵∴∵∴∵∴∵∴∵∴∵∴∵∴∵∴∵∴∵∴∵∴─────────────────────────┒
    │ ◕          ∵∴∵∴∵∴∵∴  ∵∴EASON    ∵∴∵∴     ∵∴∵∴ ◕ ┃
∵∴∵∴∵∴∵∴∵∴∵∴∵∴    ∵∴∵∴Do∵'t∵∴hi∵k.∵e∵l∵∴nd∵∴∵∴∵∴∵∴∵∴∵∴   ┃sinn
    │ Ga∵∴∵∴∵∴∵∴∵∴∵∴∵∴∵∴∵∴∵∴∵∴∵∴∵∴∵∴∵∴∵∴city rail∵∴∵∴∵∴∵∴em ┃
    │            Ng Secur∵∴∵∴∵∴∵∴∵∴stries, Inc.        ┃
∵∴∵∴∵∴∵∴ PRERELEASE∵∴∵∴ION-NOT ∵∴LD ∵∴∵∴∵∴∵∴USE    ┃
    │     ∵∴∵∴∵∴∵∴ TEST IN A PO∵∴∵∴∵∴∵∴∵∴TED AREA       ┃
    │ ◕       ∴∵∴∵∴∵∴∵∴∵∴∵MA R∵∴∵∴∵∴∵∴M-     ∵∴∵∴∵∴∵∴ ◕ ┃
∴∵∴∵∴∵∴∵∴∵∴∵∴∵∴∵∴∵∴∵∴∵∴∵∴∵∴∵∴∵∴∵∴∵∴∵━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

Name: Anonymous 2008-05-20 13:31

>>13,16-19,22
Is that in any way relevant to the topic, or is it a way of saying ``I've read Snow Crash''?

Name: Anonymous 2008-05-20 13:34

errno

Name: Anonymous 2008-05-20 14:06

>>23
I haven't read it.
I bought it because you recommended it to me here, but I just can't read this bullshit.

Name: Anonymous 2008-05-20 14:18

Snow Crash and Neuromancer are currently being used to prop up my monitor.  Hence, I cannot read them.

Name: Anonymous 2008-05-20 14:38

>>25
Why is that?

Name: Anonymous 2008-05-20 14:59

>>27
It wants to be a novel about hackers, but it is not. 256 ports located evenly at 256 km intervals? No thanks.

Name: Anonymous 2008-05-20 15:15

>>28
That's why I just read it as a regular book. Same thing as with Uplink.

Name: Anonymous 2008-05-20 16:42

>>28
You don't understand Snowcrash and/or early cyberpunk culture. Please refrain from making stupid uneducated comments. Thanks.

Name: Anonymous 2008-05-20 17:10

>>30
So I don't like something and just because I don't know cyberpunk, my opinion is invalid? HURRR.

Name: Anonymous 2008-05-20 18:08

>>31 has never discussed books, movies or music with anybody.

Name: Anonymous 2008-05-20 18:21

>>32
I have. I have also trolled you, note the HURRR. I am also not >>28.

Name: Anonymous 2008-05-20 18:55

>>33
Tsk, tsk. You're only trolling yourself (constantly, I might add), and I wish you would see that.

Name: Anonymous 2008-05-20 19:27

>>31
An assertion such as

It wants to be a novel about hackers

Is not an opinion, and as such is open for valid critical attack. Additionally, you don't understand Trolling and/or /prog/ culture. Please refrain from making stupid uneducated comments. Thanks.

Name: Anonymous 2008-05-20 19:30

>>35
get the fuck out

Name: Anonymous 2008-05-20 22:29

>>35
Please stay in /prog/, we love you.

Name: Anonymous 2008-05-21 0:37

>>1
Message queues?  USE FUCKING ERLANG!  Quit dicking around with forcing shit you know to try to do something it sucks at!  Learn something else for once!

Name: Anonymous 2008-05-21 2:44

Yeah, OP. Please use Erlang. Otherwise it will remain a useless toy language forever, confined to some obscure telephony equipment, and >>38's penis will never be huge.

Name: Anonymous 2008-05-21 6:13

>>1
Message queues?  USE FUCKING HASKELL!  Quit dicking around with forcing shit you know to try to do something it sucks at!  Learn something else for once!

Name: Anonymous 2008-05-21 8:44

It's like the film Hackers. When I first saw it, as an arrogant teenager, I mocked its unrealistic portrayal of hacking and computers. But viewing it later on, as a more mature adult, I  appreciated it as an artistic, conceptual construction that referenced hacker culture in the same way that all good art holds a mirror up to society. Also, the chick was hot.

Name: Anonymous 2008-05-21 9:33

>>41
Absolute twaddle. The movie hackers is pure fiction as hacking was never like that.

Name: Anonymous 2008-05-21 14:38

>>42 was never a real hacker and never will be, thus doesn't know what it's like.

Name: Anonymous 2008-05-21 15:14

>>42
... but it will be!  3D visualizations in tools FTW!

Name: Anonymous 2008-05-21 16:12

>>41
roflwafflebbq
I am constantly haxing my anus and thus I am a real haxer. I have haxed 1002 ports with 32 selfwritten selfextracting executables that overwrite explorer.exe and recompile the linuxkernel. GTFO, failure.

Name: Anonymous 2008-05-21 16:16

>>44
Yeah, yeah. Enlightenment will do that. You just have to wait 2D to be stable, then you might have 3D. With a complete redesign of everything.

Name: Anonymous 2008-05-21 18:44

>>42
I know. That's the point.

Name: Anonymous 2008-05-21 20:24

>>46
I'm holding out for DR18, due sometime in the next universe after the Big Crunch cycle.

Name: Anonymous 2009-08-17 0:29

Lain.

Name: ​​​​​​​​​​ 2010-10-22 2:11

Name: Sgt.Kabukiman窑蠔 2012-05-23 6:09

All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy
 All work and no play makes Jack a dull boy

Don't change these.
Name: Email:
Entire Thread Thread List