LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 08-12-2009, 11:34 AM   #1
shayke23
LQ Newbie
 
Registered: Apr 2009
Posts: 8

Rep: Reputation: 0
problems using named pipes


hi all,

i've written a client app, interacting with a proxy thru named pipes.
say, in.pipe is the named pipe the proxy reads from (the client writes to)
and the same deal with out.pipe.

the problem is, that under linux 9.04 it works perfect.
under redhat, the app get stuck.

in my code i open the named pipes with:
Code:
	int write_pipe  = open(in.pipe,O_WRONLY);
   	int read_pipe   = open(write.pipe,O_RDONLY);
my question is:
maybe under redhat i suppose to open the pipes in a different way?

thx!

btw, i create the named pipes with the shell command:
Code:
mkfifo --mode=0666 in.pipe out.pipe
 
Old 08-12-2009, 01:52 PM   #2
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,616

Rep: Reputation: 585Reputation: 585Reputation: 585Reputation: 585Reputation: 585Reputation: 585
No coding expert, but mode=0666 makes them read/write to the world. The in pipe should surely be 0444

That aside, what uid/gid are you running as? Has that user read/write perms wherever you are putting the pipe?
 
Old 08-13-2009, 01:18 AM   #3
shayke23
LQ Newbie
 
Registered: Apr 2009
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by business_kid View Post
No coding expert, but mode=0666 makes them read/write to the world. The in pipe should surely be 0444

That aside, what uid/gid are you running as? Has that user read/write perms wherever you are putting the pipe?
the in pipe cant be 0444 because than u can just read from it. nobody has permission to write to it so u must have at least 1 write bit lit.

the problem solved anyway. it was a problem concerning the permissions rather than pipes problem.

thx alot!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Client Server using named pipes whho Linux - General 3 02-03-2009 10:25 PM
Named pipes and C jobless Programming 2 10-21-2008 02:31 PM
named pipes not working over nfs the_ultimate_samurai Linux - Networking 2 09-02-2008 01:22 PM
named pipes lamtab Programming 12 12-11-2007 11:44 AM
Use of Named Pipes casey0999 Linux - Software 3 08-03-2003 02:21 PM


All times are GMT -5. The time now is 02:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration