01-28-2009
5,
0
Join Date: Nov 2008
Last Activity: 26 February 2009, 1:46 AM EST
Posts: 5
Thanks Given: 0
Thanked 0 Times in 0 Posts
Using Redhat VIA SSH client.
Alright, I'm not really sure how to say this, since my professor didn't really understand what I was saying, but we have a project in my operating systems class, and what we have to do is create a linux IPC, so I'm using the msgget(), msgsnd(), msgrcv() functions. Now, I run a Windows machine, so I connect to our Linux cluster VIA vpn + ssh client, and I do have my permissions set to read/write/execute my files. So when I go to execute my file, my msqid (the ID that is returned from msgget()) is -1, but, it has previously worked... I was able to send/receive messages, but when I exited the SSH and relogged on, I all of a sudden can't do it.
So (this is where it gets really confusing) what I've noticed is this... when I type ipcs (I'm assuming this gives you the users that are currently using the IPC channels?), it shows who else is logged on... now I've noticed that my program will run correctly if the only other person logged on has perms 666, but when I log on and get the msqid as -1, I've noticed in ipcs that there is someone that has perms 660... and I've tested this numerous times... sometimes I connect this guy with perms 660 isn't there, and I can run the program fine, but whenever he's there, I cannot get the program to run.
What I want to know is, do I get the -1 as the msqid because this guy's there, or is it coincidence? I mean, it doesn't make sense to me at all, and like I said, I couldn't get through to my professor as to why I couldn't get it working, but if anyone needs more information, like if you want to see what I have set as what, then ask. Also, these people logged on are not using my key that I send in msgget().