Program to generate SIGPIPE signal in FIFO
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > Program to generate SIGPIPE signal in FIFO




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Program to generate SIGPIPE signal in FIFO  
David


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-25-07 06:24 PM

Hi,

How to write a program in C that generates a SIGPIPE signal in FIFO.
Can someone please provide the solution.

David






[ Post a follow-up to this message ]



    Re: Program to generate SIGPIPE signal in FIFO  
Jens Thoms Toerring


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-26-07 12:23 AM

David <Vishal.Patil29@gmail.com> wrote:
> How to write a program in C that generates a SIGPIPE signal in FIFO.
> Can someone please provide the solution.

Not the program generates the signal, a process may receive one.
And one why to get one is to create a FIFO in write mode and
then to try to write to it while no other process has it open
for reading.
Regards, Jens
--
\   Jens Thoms Toerring  ___      jt@toerring.de
\__________________________      http://toerring.de





[ Post a follow-up to this message ]



    Re: Program to generate SIGPIPE signal in FIFO  
Rainer Weikusat


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-26-07 12:18 PM

David <Vishal.Patil29@gmail.com> writes:
> How to write a program in C that generates a SIGPIPE signal in FIFO.
> Can someone please provide the solution.

#include <unistd.h>

int main(void)
{
int fds[2];

pipe(fds);
close(fds[0]);
write(fds[1], fds, sizeof(*fds));
return 0;
}





[ Post a follow-up to this message ]



    Re: Program to generate SIGPIPE signal in FIFO  
David


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-27-07 12:17 PM

Hi Rainer,

You made my day!!! I had one more query. i wanted a small c program
that gives application of FIFOs.

David







On Apr 26, 12:25 pm, Rainer Weikusat <rweiku...@mssgmbh.com> wrote:
> David <Vishal.Pati...@gmail.com> writes: 
>
> #include <unistd.h>
>
> int main(void)
> {
>         int fds[2];
>
>         pipe(fds);
>         close(fds[0]);
>         write(fds[1], fds, sizeof(*fds));
>         return 0;
>
>
>
> }- Hide quoted text -
>
> - Show quoted text -







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 08:37 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register