SIGSTOP signal everytime i run my program for named pipe in linux c++ -


i have program checking if pipe exist or not wrote in function :

status = mkfifo("recv",0666); fd1 = open("recv",o_wronly); fd2 = open("sendd", o_rdonly); cout<<"we checking botth bcz have both read , write in program------:)"; if(fd1 <0 && fd2 <0) {     //strerror(errno);     err = 1;// const remote } else if(fd1 >0 || fd2 >0){     err = 2; // const local } else{     err = 3; // const progrm failure error     cout<<"program has problems"; } 

but everytime run program stops @ fd1 = open("recv",o_wronly); saying thread1: signal sigstop although works correctly fd2= open("sendd", o_rdonly); dont know why giving error?? new pipes in linux.

rtfm, http://linux.die.net/man/3/mkfifo

once have created fifo special file in way, process can open reading or writing, in same way ordinary file. however, has open @ both ends simultaneously before can proceed input or output operations on it. opening fifo reading blocks until other process opens same fifo writing, , vice versa.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -